-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
configuring routing annotation details #8939
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
Before explains how routing is working we should explain how install annotations
If a newbie comes on this page he will copy/paste the annotation on top of his function, refresh the bowser and he’ll get a huge error because we don’t tell/explain to him that he had to download annotation package before use them :-) |
Thank you @ismail1432 for this first contribution, really appreciated 👍 I think this definitely makes sense and would improve the documentation for newcomers. |
routing.rst
Outdated
@@ -12,6 +12,21 @@ URL of a page from ``/blog`` to ``/news``? How many links would you need to | |||
hunt down and update to make the change? If you're using Symfony's router, | |||
the change is simple. | |||
|
|||
Before using the annotations, be sure that you installed the annotations support : |
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.
I'd say "If you want to use the annotations, make sure you have installed the annotations
recipe:"
routing.rst
Outdated
|
||
$ composer require annotations | ||
|
||
Now, comment-out the YAML route by adding the ``#`` character: |
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.
"To turn on the routing based on annotations, un-comment the following lines of your config/routes.yaml
file:"
Hi @sroze, |
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.
Left one minor comment that we can fix during merging (so no need for you to do the work if you don't have time).
Thanks for your contribution! As said on Slack, I fully agree.
routing.rst
Outdated
|
||
$ composer require annotations | ||
|
||
To turn on the routing based on annotations, un-comment the following lines of your config/routes.yaml file by adding the ``#`` character : |
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.
The first space should be removed and please add a line break after the first word crossing the 72th character (so it reads nicely in the editor).
Hi @wouterj, To be honest I am not comfortable with this syntax, I modified following your improvements but I give you the hand if It's not good yet. |
Hey guys! We definitely need this, but I think we already got it done in #8924, right? Btw, that PR purposely has no mention of uncommenting anything: that's not necessary anymore (a file containing the route import is added by the recipe - this was added about a month ago I think). |
Oh, I'm sorry @ismail1432. It indeed looks like Ryan's PR fixes this already. So I'm closing this one. Please continue reporting/fixing doc issues if you find them. I would love to merge contributions from you! ;) (if you need any guidance/help with our PR/merge process, feel free to ping me or any other doc guy on Slack) |
No worries guys, |
Before explains how routing is working I think we should explain how install annotations.