我对symfony比较新。我创建了一个symfony项目,我正在尝试使用JMSDiExtraBundle。问题是,当我运行composer update命令时,我收到以下错误:
Updating the "app/config/parameters.yml" file
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
You have requested a non-existent service "jms_aop.pointcut_container".
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.
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
[--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
[--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]
C:\pathToProject>[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
The system cannot find the path specified.
我需要:" jms / di-extra-bundle":" 1.5.0" 但我也尝试过:" jms / di-extra-bundle":" 1.5。* @ dev" 我的symfony版本是:2.6.5
任何帮助都会受到赞赏。
答案 0 :(得分:2)
在我的情况下,我忘了在app \ AppKernel.php中注册捆绑“JMS \ AopBundle \ JMSAopBundle”:
new JMS\AopBundle\JMSAopBundle(),
答案 1 :(得分:1)
我已经解决了我的问题。在运行命令之前,我在AppKernel.php文件中包含了bundle:php composer.phar update。