简体   繁体   中英

Routing symfony2

Can you tell why I get this output?

Cannot import resource "@TwigBundle/Resources/config/routing/errors.xml" from "C:\\xampp\\htdocs\\blog\\app/config/routing_dev.yml". Make sure the "TwigBundle/Resources/config/routing/errors.xml" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered, make sure the bundle path "@TwigBundle/Resources/config/routing/errors.xml" is not empty.

This is the routing.yml:

app:
    resource: "@AppBundle/Controller/"
    type:     annotation

This is routing_dev.yml:

> _wdt:
>     resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
>     prefix:   /_wdt
> 
> _profiler:
>     resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
>     prefix:   /_profiler
> 
> _configurator:
>     resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
>     prefix:   /_configurator
> 
> _errors:
>     resource: "@TwigBundle/Resources/config/routing/errors.xml"
>     prefix:   /_error
> 
> _main:
>     resource: routing.yml

And composer.json :

{
    "name": "claudiul/blog",
    "license": "proprietary",
    "type": "project",
    "autoload": {
        "psr-0": {
            "": "src/"
        }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.3.*",
        "doctrine/orm": "^2.4.8",
        "doctrine/doctrine-bundle": "~1.2",
        "twig/extensions": "~1.0",
        "symfony/assetic-bundle": "~2.3",
        "symfony/swiftmailer-bundle": "~2.3",
        "symfony/monolog-bundle": "~2.4",
        "sensio/distribution-bundle": "~2.3",
        "sensio/framework-extra-bundle": "^3.0.2",
        "sensio/generator-bundle": "~2.3",
        "incenteev/composer-parameter-handler": "~2.0"
    },
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "minimum-stability": "stable",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        }
    }
}

Thank you

这是一个symfony的2.6功能,看这里

是的,您应该将Symfony应用程序更新为Symfony 2.6或不使用此功能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM