Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[RFC] Provide event for collecting routes from bundles #343

Copy link
Copy link
Closed
@Koc

Description

@Koc
Issue body actions

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.