Closed
Description
Hi,
I don't know if my proposal really worths it but let's try. Everytime we need to write a new @Route
annotation on a controller, we have to provide at least the path and then optional values. In the latters, we often have to give a name to the route. So, writing the following code always bores me:
@Route("/about", name="about")
I was wondering if we could simplify the annotation to the following:
@Route("/about", "about")
By convention, we could admit that if there are two unnamed arguments given to the Route, then it's the path in the first one and the name in the second one. This would make the annotation shorter to write.
What do you think?
Is it possible to implement it with the current implementation of the Doctrine annotations package?
Metadata
Metadata
Assignees
Labels
No labels