Closed
Description
It would be useful if we can add route resources files when enabling bundle in kernel with zero-config changes.
<?php
namespace MyBundle\EventListener;
class RouteCollectionEventListener
{
public function addRoutes(BuldRouteCollectionEvent $event)
{
$event->add('@MyBundle/routing.yml');
$event->add('@MyBundle/Controller', 'annotation'); // maybe we can also add priority option
}
}
See https://github.com/modera/ModeraRoutingBundle/blob/master/Routing/Loader.php and https://github.com/modera/ModeraRoutingBundle/blob/master/README.md for similar approach
Metadata
Metadata
Assignees
Labels
No labels