2015-12-10 6 views
3

Можете ли вы рассказать, почему я получаю этот выход?Маршрутизация symfony2

Невозможно импортировать ресурс "@ TwigBundle/Ресурсы/конфигурации/маршрутизации/errors.xml" из "C: \ XAMPP \ HTDOCS \ блог \ приложение/Config/routing_dev.yml". Убедитесь, что пакет «TwigBundle/Resources/config/routing/errors.xml» правильно зарегистрирован и загружен в класс ядра приложения. Если пакет зарегистрирован, убедитесь, что путь пакета «@ TwigBundle/Resources/config/routing/errors.xml» не пуст.

Это routing.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" 
     } 
    } 
} 

Спасибо

+0

поделитесь своим routing_dev.yml и вашим композитором.json – CoKe

+0

Я обновил сообщение. – codi05ro

ответ

0

Да, вы должны обновить приложение Symfony до Symfony 2.6 или не использовать эту функцию.

0

Это особенность функции symfony 2.6: here.

Смежные вопросы