Skip to content

Conversation

idetox
Copy link
Contributor

@idetox idetox commented Jun 27, 2019

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.

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.
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:
Copy link
Member

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...”

Copy link
Contributor Author

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 ?

@weaverryan
Copy link
Member

Status: needs work

@OskarStark OskarStark requested a review from weaverryan July 3, 2019 04:39
@idetox
Copy link
Contributor Author

idetox commented Jul 31, 2019

@weaverryan did you have time to review ?
thx !

@javiereguiluz javiereguiluz added this to the 4.3 milestone Sep 20, 2019
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull request Sep 20, 2019
…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
@javiereguiluz javiereguiluz merged commit 8557b34 into symfony:4.3 Sep 20, 2019
@javiereguiluz
Copy link
Member

@idetox thanks for helping us improve this! I did some minor rewords while merging to mach Ryan's suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants