【问题标题】:Symfony 3.4:The service "nelmio_api_doc.formatter.html_formatter" has a dependency on a non-existent service "templating"Symfony 3.4:服务“nelmio_api_doc.formatter.html_formatter”依赖于不存在的服务“模板”
【发布时间】:2018-02-07 12:04:33
【问题描述】:

这是 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"

【问题讨论】:

标签: symfony nelmioapidocbundle


【解决方案1】:

为了解决这个问题,使用composer安装模板组件:

composer require symfony/templating

然后,在config.yml的framework键下添加如下配置:

templating:
    engines: ['twig']

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-05-18
    • 1970-01-01
    • 2016-01-29
    • 1970-01-01
    • 2022-11-10
    • 2017-03-21
    • 2019-09-28
    • 2015-05-29
    相关资源
    最近更新 更多