繁体   English   中英

Symfony2 - Composer 清除缓存错误

[英]Symfony2 - Composer clear cache error

尝试清除 symfony2 项目上的缓存时,我收到此错误消息:

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

任何的想法? 谢谢你。

编辑:

尝试更新供应商时,我收到此错误消息:

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.

在 composer.json 中检查您的版本(并在 composer.lock 中仔细检查基于 Symfony 的库的版本)。 isVerbose仅在 2.4 版的 ConsoleOutput 中可用。

你可能有一些 Symfony 库的混合版本。

如果您先删除目录,则可以修复它:

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

我遇到了类似的问题。 为 CLI 禁用 PHP opcache对我有帮助。

php.ini禁用它:

opcache.enable_cli=0

保存文件并再次尝试清除缓存。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM