使用 composer.phar 更新 symfony/swiftmailer-bundle 到 v2.2.5 后,我得到这样的错误:
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/swiftmailer-bundle (v2.2.4)
- Installing symfony/swiftmailer-bundle (v2.2.5)
Loading from cache
Writing lock file
Generating autoload files
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
The service definition "swiftmailer.mailer" does not exist.
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.
降级到 2.2.4 后问题已解决
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing symfony/swiftmailer-bundle (v2.2.5)
- Installing symfony/swiftmailer-bundle (v2.2.4)
Loading from cache
Writing lock file
Generating autoload files
Clearing the cache for the dev environment with debug true
Installing assets using the hard copy option
Installing assets (part of code removed)