An error occurred when executing the "'cache:clear --no-warmup'" command - symfony

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
i like to upgrade my symfony2.0 project to symfony 2.3 .
https://github.com/symfony/symfony-standard/blob/v2.3.1/UPGRADE.md
i followed above one to upgrade my project .But i'm facing following errors
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.

run sudo php composer.phar update --no-scripts

I had the same error. I tried to run
php app/console
and got another error. I fixed this error and afterwards I could update without this unspecific error.

Related

Command "make:entity" is not defined. Symfony 4.4

when I run
php bin/console make:entity
the output is
[critical] Error thrown while running command ""make:entity"". Message: "Command "make:entity" is not defined.
Did you mean one of these?
make:admin:crud
make:admin:dashboard
make:admin:migration"

Cannot Composer Install with Symfony - PhpStorm

I had a problem with my Ubuntu so I needed to install back everything.
Nearly all is done but when I start a new project with Symfony on PhpStorm, and when I do a composer install or composer update in the terminal I have an error that I don't know how to treat.
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DOMDocument" from the global namespace.
Did you forget a "use" statement? in /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52
Stack trace:
#0 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(284): Symfony\Component\Config\Util\XmlUtils::loadFile('/var/www/html/E...', Array)
#1 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(41): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->parseFileToDOM('/var/ww
w/html/E...')
#2 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(57): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->load('web.xm
l')
#3 /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php in /var/www/html/Eval2/vendor/symfony/symfony/src/Symfony/Component/
Config/Util/XmlUtils.php on line 52
I tried installing composer following this link
but I don't recall using such practice.
So I cannot move forward with my project because I can't get past composer... if anyone knows why and could give me a step-by-step approach that would be truly appreciated.
Thank you
PHP's DOMDocument library is not installed. You need to install it. Try -
sudo apt-get install php-dom

Having issue on installing symfony doctrine-migrations-bundle

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_000000001f94ab4b000000005d7f3b02e5139c916d21af4abfe5ffe5dd20d49e::__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
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"

Bootstrap 3 in Symfony2

I'm trying to use bootstrap in my symfony project . But when I configure json file through this error. However I have included
new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle()
I have looked up from here
error:
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Class 'Braincrafted\Bundle\BootstrapBundle\BraincraftedBo
otstrapBundle' not found in /home/kanat/Public/bootstrap/app/AppKernel.php
I have looked up from here
like the error says, its having touble clearing the cache, that could be a directory permission issue,set the folder permissions to read write and execute and then try to clear cache again, (in linux it would be sudo chmod -R 777 *)

Symfony2 error on command line

When i try to update with composer, or clear cache, or other command i have :
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: file_put_contents(/vagrant/crm_neo/app/cache/dev/assetic/routing.yml): failed to open stream: No such file or directory in /vagrant/crm_neo/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/DependencyInjection/Compiler/RouterResourcePass.php line 43
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
What can i do ? Thanks !

Resources