Symfony2 安装失败 - 错误 1866(不允许属性"路径")/文件加载器加载异常(无法导入资源)



我正在尝试使用流浪安装一个预先制作的开发环境。最后一个组件是符号2。控制台出现错误(如下所示)。有什么解决办法吗?我试过在谷歌上搜索它们,但没有成功。感谢您的真知灼见!

安装日志:

==> default: 
==> default:                                                                                                                                                                        
==> default:   [SymfonyComponentConfigExceptionFileLoaderLoadException]                                                                                                         
==> default:   Cannot import resource "/srv/wealthbot/vendor/friendsofsymfony/jsrouting-bundle/Resources/config/routing/routing.xml" from "/srv/wealthbot/app/config/routing.yml".  
==> default:                                                                                                                                                                        
==> default: 
==> default:                                                                                                                                                                    
==> default:   [InvalidArgumentException]                                                                                                                                       
==> default:   [ERROR 1866] Element '{http://symfony.com/schema/routing}route', attribute 'path': The attribute 'path' is not allowed. (in /srv/wealthbot/ - line 6, column 0)  
==> default:                                                                                                                                                                    
==> default: 
==> default: cache:warmup [--no-optional-warmers]
==> default: Warming up the cache for the prod environment with debug false
==> default: 

/srv/wealthbot/vvendor/friendsofsymfony/jsrouting-bundle/Resources/config/routing/routing.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
    <route id="fos_js_routing_js" path="/js/routing.{_format}">
        <default key="_controller">fos_js_routing.controller:indexAction</default>
        <default key="_format">js</default>
        <requirement key="_format">js|json</requirement>
    </route>
</routes>

来自/srv/wealthbot/app/config/的routing.yml:

# Internal routing configuration to handle ESI
#_internal:
#    resource: "@FrameworkBundle/Resources/config/routing/internal.xml"
#    prefix:   /_internal
fos_user_security:
    resource: "@FOSUserBundle/Resources/config/routing/security.xml"
fos_user_profile:
    resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
    prefix: /profile
fos_user_register:
    resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
    prefix: /register
fos_user_resetting:
    resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
    prefix: /resetting
fos_user_change_password:
    resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
    prefix: /profile
fos_user_group:
    resource: "@FOSUserBundle/Resources/config/routing/group.xml"
    prefix: /group
fos_js_routing:
    resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
NelmioApiDocBundle:
    resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
    prefix:   /api/doc

Symfony 2.1(顺便说一下,它很久以前就放弃了支持)没有路由的path属性。那时您必须使用pattern属性。

相关内容

  • 没有找到相关文章

最新更新