4
votes

Everything worked fine until I actualize the vendors.

Then when I clean the cache I get the following error:

PHP Fatal error: Class 'Doctrine\ORM\Tools\Console\Command\ClearCache\CollectionRegionCommand' not found in /var/app/ondeck/vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/Command/Proxy/CollectionRegionDoctrineCommand.php on line 29

3

3 Answers

6
votes

I was also having the same issue but with Symfony 2.4 with the following inside my composer.json file:

    "symfony/symfony": "~2.4",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "~1.2",
    "doctrine/doctrine-migrations-bundle" : "dev-master",
    "doctrine/doctrine-fixtures-bundle" : "dev-master",

I had version 2.4.1 of Doctrine ORM installed which if you look on Github here:

You can that the file mentioned is not present (no sure why). But it is present on the 'master' branch here. Not sure if you will be able to change to using master for Doctrine ORM based on other dependencies, but it was ok for me to switch to 'master' like so:

    "symfony/symfony": "~2.4",
    "doctrine/orm": "dev-master",
    "doctrine/doctrine-bundle": "~1.2",
    "doctrine/doctrine-migrations-bundle" : "dev-master",
    "doctrine/doctrine-fixtures-bundle" : "dev-master",

And then run: ./composer.phar update doctrine/orm

0
votes

A best practice with composer is never do an update without specify the name of the dependency you want to update.

For example in symfony2, if you have a working version: Instead of doing

php composer.phar update

do

php composer.phar update [name of the vendor]

In other case: if you clone an existing project and you want install vendors localy, do

php comoser.phar install

Never update vendors globaly.

0
votes

ok modify your composer.json and set :

    "doctrine/orm": "~2.2,>=2.2.3",

It works for us.