Loader not called
Hi,
Pulled a fresh Symfony 2.7.4 and added consolebundle The routing is not added.
Bundle works if you add routing manually via import in app/config/routing.yml so the services are loaded.
I threw an error in the CoreSphere\ConsoleBundle\Routing\Loader -> load() method (threw 1/0), the error was not raised... so is this method called at all?. Any idea why routing not added?
I guess that's an error in the readme file. @TomasVotruba wanted to change the bundle to load the routes automagically but I just read on http://symfony.com/doc/current/cookbook/routing/custom_route_loader.html that you still need to add
console:
resource: .
type: extra
to your routing_dev.yml
Ok, confirmed.
Perhaps it would be better to revert to the old import method? I am note sure what the benefits of this loading method has over
_console:
resource: "@CoreSphereConsoleBundle/Resources/config/routing.yml"
It surely adds a layer of (unwarranted?) complexity - or at least, it obscures the routes.
On a side note, @TomasVotruba I guess the CoreSphereConsoleExtension -> prepend() doesn't work then for routing?
It seems like the prepending works just for "normal" config values but not for routes. If this is the case I agree we should revert the change because the old way to include the routes looks simpler.
I'd rather add:
console:
resource: .
type: extra
to README.md, since it might be used by other packages or modular routing for controllers.
(I have already fixed the readme for now)
the "extra" label seems pretty arbitrary to me - like an artifact from following the example code. shouldn't it be renamed to something more bundle specific like "console" or "coresphere" or "coresphere_console"? Other bundles may use the "extra" label as well and then I am not able to distinguish which routes I want to load.
Thanks.
I don't have any knowledge about "extra" key meaning, so feel free to adjust as needed. If it's something package specific, "coresphere_console" would be fine.