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. 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. 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中删除/添加了它?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.