Symfony2:您请求了一个不存在的服务";jms_aop.pointcut_container”;


Symfony2: You have requested a non-existent service "jms_aop.pointcut_container".

我对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额外捆绑包":"1.5.0"但我也尝试过:"jms/di extra bundle":"1.5.*@dev"我的symfony版本是:2.6.5

任何帮助都将不胜感激。

在我的案例中,我忘记在app''AppKernel.php中注册捆绑包"JMS''AopBundle''JMSAopBundle":

new JMS'AopBundle'JMSAopBundle(),

我已经解决了我的问题。在运行命令php composer.phar update之前,我已经将捆绑包包含在AppKernel.php文件中。