Symfony 3.0 - Cannot load resource “.” - Custom Ro

2019-07-13 10:20发布

问题:

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.

I took a look at the documentation: http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html

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

My routing.yml configuration looks like this:

custom_sidebar_routing:
    resource: .
    type: sidebar

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

回答1:

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