-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Updated the Quick Tour to the latest changes introduced by Symfony #5631
Conversation
@@ -155,11 +155,12 @@ because that will be explained in the next section):: | |||
|
|||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |||
use Symfony\Component\HttpFoundation\Request; |
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.
This is not needed.
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.
You are right. I've added it to make it identical to the controller they will see. We decided to add the Request
import to make it easier for newcomers: https://github.com/symfony/symfony-standard/blob/2.8/src/AppBundle/Controller/DefaultController.php#L7
However, the content of the indexAction()
is not the same as in the symfony-standard. I did this because in this case it's more confusing than useful.
In any case, let me know what you think about this and I'll make the changes you say. Thanks.
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 am not sure if it makes things easier to understand for newcomers when they see a use
statement for a class that is not used anywhere. It could give them the feeling that simply adding the use
statement triggers some magic. However, let's see what Ryan and Wouter think about it.
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 agree with @xabbuh here. I can see why it's usefull at the code side, I think it's confusion when doing it in the docs.
defined in the ``src/AppBundle/Controller/DefaultController.php`` file and rendered | ||
the ``app/Resources/views/default/index.html.twig`` template. In the following | ||
sections you'll learn in detail the inner workings of Symfony controllers, routes | ||
and templates. |
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 new word wrapping in this paragraph is incorrect (the previous word wrapping was done by docbot)
I've changed everything you asked me to. This is ready for the final review. Thanks! |
👍 |
1 similar comment
👍 |
… by Symfony (javiereguiluz) This PR was squashed before being merged into the 2.3 branch (closes #5631). Discussion ---------- Updated the Quick Tour to the latest changes introduced by Symfony | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - This PR complements the pending PR #5497. Commits ------- 45b3781 Updated the Quick Tour to the latest changes introduced by Symfony
👍 |
This PR complements the pending PR #5497.