如何为sensio框架控制器侦听器启用注释阅读器服务?

问题描述 投票:0回答:1

在对作曲家进行更新以修复我的应用程序使用的程序包上的某些漏洞之后,我处理了一个错误:

服务“ sensio_framework_extra.controller.listener”依赖于不存在的服务“ annotation_reader”

this answer中的建议,我尝试添加doctrine/annotations程序包,但并不能解决我的问题(程序包似乎已安装)。

λ composer require doctrine/annotations
Using version ^1.8 for doctrine/annotations
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.2.*"
Nothing to install or update

这是我的composer.json使用的软件包:

"require": {
    "php": "^7.1.3",
    "ext-ctype": "*",
    "ext-fileinfo": "*",
    "ext-iconv": "*",
    "ext-json": "*",
    "doctrine/doctrine-fixtures-bundle": "^3.1",
    "ekyna/payum-monetico-bundle": "^1.5",
    "gedmo/doctrine-extensions": "^2.4",
    "knplabs/knp-paginator-bundle": "^3.0",
    "payum/offline": "^1.5",
    "payum/paypal-express-checkout-nvp": "^1.5",
    "payum/payum-bundle": "^2.3",
    "php-http/guzzle6-adapter": "^2.0",
    "sensio/framework-extra-bundle": "^5.1",
    "stof/doctrine-extensions-bundle": "^1.3",
    "symfony/asset": "4.2.*",
    "symfony/console": "4.2.*",
    "symfony/dotenv": "4.2.*",
    "symfony/expression-language": "4.2.*",
    "symfony/flex": "^1.1",
    "symfony/form": "4.2.*",
    "symfony/framework-bundle": "4.2.*",
    "symfony/monolog-bundle": "^3.1",
    "symfony/orm-pack": "1.*",
    "symfony/process": "4.2.*",
    "symfony/security-bundle": "4.2.*",
    "symfony/serializer-pack": "1.*",
    "symfony/swiftmailer-bundle": "^3.1",
    "symfony/templating": "4.2.*",
    "symfony/translation": "4.2.*",
    "symfony/twig-bundle": "4.2.*",
    "symfony/validator": "4.2.*",
    "symfony/web-link": "4.2.*",
    "symfony/webpack-encore-bundle": "^1.4",
    "symfony/yaml": "4.2.*",
    "twig/extensions": "^1.5",
    "vich/uploader-bundle": "^1.8"
},
"require-dev": {
    "codeception/codeception": "^2.5",
    "codeception/c3": "2.*",
    "friendsofphp/php-cs-fixer": "^2.14",
    "php-coveralls/php-coveralls": "^2.1",
    "phpmd/phpmd": "2.*",
    "squizlabs/php_codesniffer": "*",
    "symfony/debug-pack": "*",
    "symfony/maker-bundle": "^1.11",
    "symfony/profiler-pack": "*",
    "symfony/test-pack": "^1.0",
    "symfony/web-server-bundle": "4.2.*"
}
symfony annotations symfony4
1个回答
0
投票

由于教义(或教义/注释)本身未注册服务(为什么要注册,所以我查找了教义包,doctrine/doctrine-bundle提供了annotation_reader服务:https://github.com/doctrine/DoctrineBundle/blob/af8ac792c9b970ff2bc25b49ab9b31afd9e03dbf/Resources/config/orm.xml#L82

© www.soinside.com 2019 - 2024. All rights reserved.