Symfony2 cache flush error - Composer

When I try to clear the cache of my symfony2 project, I get this error message:

PHP Fatal error:  Call to undefined method Symfony\Component\Console\Output\ConsoleOutput::isVerbose() in /var/staging_www/www.sciforum.net/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php on line 87

Any idea? Thank.

EDIT:

When I try to upgrade suppliers, I get the following error message:

Clearing the cache for the dev environment with debug true
PHP Fatal error:  Call to undefined method Symfony\Component\Console\Output\ConsoleOutput::isVerbose() in /var/staging_www/www.sciforum.net/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php on line 99
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.
+4
source share
2 answers

Check your versions in composer.json (and double check the versions for symfony-based libraries in composer.lock). isVerbosebecame available only in ConsoleOutput with version 2.4.

You may have mixed versions of the Symfony libraries.

0
source

You can fix it by first deleting directories:

sudo rm -rf app/logs
sudo rm -rf app/cache
0
source

All Articles