[英]Symfony 3 composer update ContextErrorException
I'm trying to implement a Symfony2 project (from Ubuntu 14.04) in Symfony 3 for Ubuntu 16.04, and I've hit a bit of a wall. 我正在尝试在适用于Ubuntu 16.04的Symfony 3中实现Symfony2项目(来自Ubuntu 14.04),但遇到了一些麻烦。 When I run composer update (verbose) I receive the following exception and trace at the end, and I'm not really sure how to clear it up.
当我运行composer update(详细)时,我收到以下异常并最终跟踪,但我不确定如何清除它。 I know I'm doing something wrong, but the exception isn't exactly helpful in pinning down where the problem might be.
我知道我做错了事,但是该异常并不能帮助您确定问题所在。 Has anyone run into this problem before and know some likely culprits?
有没有人遇到过这个问题并且知道一些可能的罪魁祸首?
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: Invalid argument supplied for foreach()
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:
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: Invalid argument supplied for foreach()
Exception trace:
() at /vendor/sensio/distribution-bundle/Composer/ScriptHandler.php:293
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeCommand() at /vendor/sensio/distribution-bundle/Composer/ScriptHandler.php:143
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache() at /usr/share/php/Composer/EventDispatcher/EventDispatcher.php:238
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at /usr/share/php/Composer/EventDispatcher/EventDispatcher.php:192
Composer\EventDispatcher\EventDispatcher->doDispatch() at /usr/share/php/Composer/EventDispatcher/EventDispatcher.php:79
Composer\EventDispatcher\EventDispatcher->dispatch() at /usr/share/php/Composer/EventDispatcher/EventDispatcher.php:177
Composer\EventDispatcher\EventDispatcher->doDispatch() at /usr/share/php/Composer/EventDispatcher/EventDispatcher.php:94
Composer\EventDispatcher\EventDispatcher->dispatchScript() at /usr/share/php/Composer/Installer.php:337
Composer\Installer->run() at /usr/share/php/Composer/Command/UpdateCommand.php:173
Composer\Command\UpdateCommand->execute() at /usr/share/php/Symfony/Component/Console/Command/Command.php:256
Symfony\Component\Console\Command\Command->run() at /usr/share/php/Symfony/Component/Console/Application.php:841
Symfony\Component\Console\Application->doRunCommand() at /usr/share/php/Symfony/Component/Console/Application.php:189
Symfony\Component\Console\Application->doRun() at /usr/share/php/Composer/Console/Application.php:166
Composer\Console\Application->doRun() at /usr/share/php/Symfony/Component/Console/Application.php:120
Symfony\Component\Console\Application->run() at /usr/share/php/Composer/Console/Application.php:99
Composer\Console\Application->run() at /usr/bin/composer:44
您是否已删除/添加了一个库,却忘记了从AppKernel中删除/添加了它?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.