路由符号2


Routing symfony2

你能告诉我为什么得到这个输出吗?

无法从"C:''examplep''htdocs''blog''app/config/routing_dev.yml"导入资源"@TwigBundle/Resources/config/routing/errors.xml"。请确保在应用程序内核类中正确注册并加载了"TwigBundle/Resources/cnfig/routing.errors.xml"捆绑包。如果捆绑包已注册,请确保捆绑包路径"@TwigBundle/Resources/config/routing/errors.xml"不为空。

这是路线。yml:

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

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

和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"
        }
    }
}

感谢

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

这是一个symfony 2.6功能的外观。