Symfony 3.4:服务“nelmio_api_doc.formatter.html_formatter”依赖于不存在的服务“模板化”

时间:2018-02-07 12:04:33

标签: symfony nelmioapidocbundle

这是来自Symfony 3.4项目的composer.json文件的require部分

 "require": {
            "php": ">=5.5.9",
            "doctrine/doctrine-bundle": "^1.6",
            "doctrine/orm": "^2.5",
            "friendsofsymfony/rest-bundle": "^2.3",
            "incenteev/composer-parameter-handler": "^2.0",
            "jms/serializer-bundle": "^2.3",
            "nelmio/api-doc-bundle": "^2.12",
            "sensio/distribution-bundle": "^5.0.19",
            "sensio/framework-extra-bundle": "^5.0.0",
            "symfony/monolog-bundle": "^3.1.0",
            "symfony/polyfill-apcu": "^1.0",
            "symfony/swiftmailer-bundle": "^2.6.4",
            "symfony/symfony": "3.4.*",
            "symfony/templating": "^4.0",
            "twig/twig": "^1.0||^2.0"

1 个答案:

答案 0 :(得分:3)

要解决此问题,请使用composer:

安装模板组件
map.forEach((k,v)->v.add("abc"));

然后,在config.yml中的框架密钥下添加以下配置:

composer require symfony/templating