Closed
Description
Q | A |
---|---|
Feature request? | yes |
RFC? | yes |
Symfony version | 3.3 |
When one defines a controller as a service, it would be nice to be able to wire it with routing in a snap of a tag.
eg
services:
Controller\SomeController:
tags:
- name: routing.annotated_controller
prefix: /foo #optional, maybe the other route params as other tag attributes if worth it?
Using this tag, the routes would be specified as annotations on the related class+methods (which means moving AnnotatedRouteControllerLoader to FrameworkBundle.
This would allow bundles to take control of the wiring of their routing configuration. This means that just by enabling a bundle, its routing config would be done. Of course, each bundle could provide config to change the prefix, disable/enable routes conditionally, etc.
I also think that this would mean one less file to look at for new comers (I mean routing.yml.)
If someone would like to give it a try, please do :)
Metadata
Metadata
Assignees
Labels
RFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)