Title: Having issue on installing symfony doctrine-migrations-bundle
Tags: symfony;doctrine-orm
Question: While I run command php composer.phar update it shows the following error. Can anyone help me out for fix it?
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Fatal error: Call to protected DoctrineORMEntit
yManager_000000001f94ab4b000000005d7f3b02e5139c916d21af4abfe5ffe5dd2075b5:f2c1:f5d7:b954:8dc3:cee9:baf:a8c0__construct() from context 'appDevDebugProjectCon
tainer' in /var/www/html/app/cache/dev/appDevDebugProjectContainer.php:747
Stack trace:
#0 /var/www/html/app/bootstrap.php.cache(2125): appDevDebugProjectContainer->getDoctrine_Orm_DefaultEntityManagerService()
#1 /var/www/html/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ManagerRegistry.php(35): Symfony\Component\DependencyInj
ection\Container->get('doctrine.orm.de...')
#2 /var/www/html/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php(231): Symfony\Bridge\Doc
trine\ManagerRegistry->getService('doctrine.orm.de...')
#3 /var/www/html/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php(54): Doctrine\Common\Pe
rsistence\AbstractManagerRegistry->getManagers()
#4 /var/www/html/vendor/symfony/symfony/src/Symfony/Compo in /var/www/html/app/cache/dev/appDevDebugProjectContainer.php on
line 747
Comment: Well, did it. but no luck.

Comment: Something may be out of sync. Try manually deleting the cache `rm -fr app/cache/*` and re-run the composer command.


Here is another answer: First remove the bundle from your composer.json.
Then try :
// replace app by var depending on your symfony version (2 or 3)
rm -Rf app/cache
// clean all your dependencies
rm -Rf vendor
// reinstall them from your composer.lock
composer install
// install this particular bundle
composer require doctrine/doctrine-migrations-bundle "^1.0"

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:12/27/16', 'FavoriteCount': 0.0, 'PostTypeId': 1, 'Tags': '<symfony><doctrine-orm>', 'Title': 'Having issue on installing symfony doctrine-migrations-bundle', 'ViewCount': 285, 'id': 41353548, 'user_AboutMe': None, 'user_AccountId': 1487257.0, 'user_DisplayName': 'Md. Kausar Alam', 'user_Reputation': 117.0, 'user_Views': 41.0, 'user_id': 1395215.0}}