Symfony 3.0-无法加载资源“". -自定义路线装载机 [英] Symfony 3.0 - Cannot load resource "." - Custom Route Loader

查看:90
本文介绍了Symfony 3.0-无法加载资源“". -自定义路线装载机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的一个项目升级到SF 3:
该项目使用了一些自定义的路由加载程序,这些加载程序以前一直可以正常工作,现在我得到一个FileLoaderLoadException指出无法加载resource ".".

I am working on upgrading one of my projects to SF 3:
The project uses some custom routing loaders which where working without problems before, now I am getting a FileLoaderLoadException stating that the resource "." couldn't be loaded.

我看了一下文档: http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html

但是要么什么都没有改变,要么文档没有更新.

But either nothing has changed or the documentation has not been updated.

我的routing.yml配置如下:

My routing.yml configuration looks like this:

custom_sidebar_routing:
    resource: .
    type: sidebar

有人可以提示我这里有什么问题吗,或者可以确认这是symfony内核中的错误吗?

Can someone give me a hint what is wrong here or can confirm that this is a bug inside symfony core?

推荐答案

解决了我的问题,配置很好,但是我错过了在BundleExtensionFile中将我的附加routing_loader.yml(我已经定义了我的加载程序服务)注册到了BundleExtensionFile中. DependencyInjection文件夹

Solved my problem, configuration was good, but I missed to register my additional routing_loader.yml (in which I had defined my loader services) inside the BundleExtensionFile in the DependencyInjection folder

这篇关于Symfony 3.0-无法加载资源“". -自定义路线装载机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆