-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Added annotations example to Linking to Pages examples #5781
Conversation
In the routing examples for the Linking to Pages section there were no annotations examples (which is what most people use). I have added these examples
.. code-block:: php-annotations | ||
|
||
// src/AppBundle/Controller/WelcomeController.php | ||
class WelcomeController extends Controller |
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.
At the beginning of the annotations snippets we should put the use
imports needed to make the code work:
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
// ...
Added missing use statements for new annotations code example
Added the missing use statements |
Remove indentation in blank line
👍 @xabbuh can you please restart this travis build |
@@ -867,6 +867,23 @@ configuration: | |||
|
|||
.. configuration-block:: | |||
|
|||
.. code-block:: php-annotations | |||
|
|||
// src/AppBundle/Controller/WelcomeController.php |
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.
we will also need the namespace declaration
@carlos-granados Thank you for your good job. I just left you some last minor comment and restarted the Travis build (it's green now :)). We also have at least one other routing config example on that page (when talking about hinclude.js). Would you like to update that as well? |
Ok, will look at it tomorrow |
added the namespace statements to the annotation examples
@xabbuh I added the missing namespace statements. In the case of about hinclude.js examples, they are not routing examples, they are config examples, so there is no annotations code that can be added |
You are right. I have must have confused it. 👍 |
…arlos-granados) This PR was merged into the 2.3 branch. Discussion ---------- Added annotations example to Linking to Pages examples In the routing examples for the Linking to Pages section there were no annotations examples (which is what most people use). I have added these examples Commits ------- 43f751e Added missing namespace statements 5941b89 Remove indentation in blank line 05da696 Added missing use statements 30e0dd4 Added annotations example to Linking to Pages examples
Thanks again Carlos! I tweaked the code-blocks at sha: 43e440b. I don't remember if this follows our coding standards or not, but I wanted to focus on the route using as little code as possible. |
In the routing examples for the Linking to Pages section there were no annotations examples (which is what most people use). I have added these examples