2

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?

Patrick Reck
  • 329
  • 2
  • 4
  • 16
Nickolaus
  • 4,785
  • 4
  • 38
  • 60
  • try with `resource: '.' ` – Matteo Apr 04 '16 at 09:36
  • thx for the idea, I already had the same one, unfortunately it's not working either (also tried *) which is not working – Nickolaus Apr 04 '16 at 09:38
  • Hi, I see your code is equal to the doc also http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html#using-the-custom-loader – Matteo Apr 04 '16 at 09:40
  • 1
    Yes, my code is exactly following the guidelines of the documentation – Nickolaus Apr 04 '16 at 09:41
  • Does Your custom loader method looks like this? `public function supports($resource, $type = null) { return 'sidebar' === $type; }` Or this: `public function supports($resource, $type = null) { return 'extra' === $type; }` – barat Apr 04 '16 at 10:30
  • the identifier is "sidebar" but that is not the problem, symfony already crashes when trying to parse the yml file because it cannot interpret: "resource: ." – Nickolaus Apr 04 '16 at 10:47

1 Answers1

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

Nickolaus
  • 4,785
  • 4
  • 38
  • 60