Skip to content

How to change Controller folder path ? #42487

Answered by stof
MohamedZogh asked this question in Q&A
Discussion options

You must be logged in to vote

All classes that extend AbstractController are already automatically tagged with controller.service_arguments without the need for an explicit tagging during loading. And as of Symfony 5.3, this is also true for any classes tagged as #[AsController] on PHP 8+.
That's why the explicit tagging during loading has been removed from the recipe: the recommended way is to either extend AbstractController or to use the attribute (and then, the loading of the whole src folder already makes those controller work)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@MohamedZogh
Comment options

@stof
Comment options

@MohamedZogh
Comment options

Answer selected by MohamedZogh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants