-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Refactor documentation - Do not add annotation configuration if you are using Symfony Flex #11838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Do not add annotation routing configuration if your project uses Symfony Flex since the recipe already created the annotations.yaml file with the config inside.
best_practices/controllers.rst
Outdated
To load routes defined as annotations in your controllers, add the following | ||
configuration to the main routing configuration file: | ||
To load routes defined as annotations in your controllers and if you are not using Symfony Flex, add the following | ||
configuration to the annotation routing configuration file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great find with this. I think we can go further and fully assume Flex and reword this section to read something more like this:
To load routes defined as annotations in your controllers, run “composer require doctrine/annotations”. Thanks to the Flex recipe, a config/routes/annotations.yaml file will be created:
... show the file
... then continue on like normal with “This Configuration...”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we spread this modification to other branches ?
If so, i guess i should duplicate the PR once you validate it ? Or will you be able to do it automatically ?
Status: needs work |
@weaverryan did you have time to review ? |
…nfiguration if you are using Symfony Flex (idetox, elescot) This PR was merged into the 4.3 branch. Discussion ---------- Refactor documentation - Do not add annotation configuration if you are using Symfony Flex Do not add annotation routing configuration if your project uses Symfony Flex since the recipe already added the annotations.yaml file with the config inside. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 8557b34 Removing space before colon 5190b5e Refactor documentation assuming we use Symfony Flex e1521a0 Update controllers.rst
@idetox thanks for helping us improve this! I did some minor rewords while merging to mach Ryan's suggestions. |
Do not add annotation routing configuration if your project uses Symfony Flex since the recipe already added the annotations.yaml file with the config inside.