-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added docs mentioning UserInterface in action args #7060
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
@@ -995,14 +995,14 @@ After authentication, the ``User`` object of the current user can be accessed | |||
via the ``security.token_storage`` service. From inside a controller, this will | |||
look like:: |
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 paragraph needs to be changed
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.
What do you suggest? It's still correct
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.
Indeed, sorry. The paragraph is a bit confusing, but correct.
@@ -1012,6 +1012,11 @@ look like:: | |||
The user will be an object and the class of that object will depend on | |||
your :ref:`user provider <security-user-providers>`. | |||
|
|||
.. versionadded:: 3.2 | |||
The functionality to get the user via the method signature was added in 3.2, |
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.
"was introduced in Symfony 3.2. You can still retrieve it by [...]"
status: needs work Thanks for the docs PR! |
d68c5d7
to
7849fa2
Compare
👍 |
.. versionadded:: 3.2 | ||
The functionality to get the user via the method signature was introduced in | ||
Symfony 3.2. You can still retrieve it by calling ``$this->getUser()`` if you | ||
extend the :class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\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.
[...] the Controller class.
{ | ||
// $user is null when not logged-in or anon. | ||
} | ||
|
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 blank line should be removed
This PR was merged into the master branch. Discussion ---------- Added docs mentioning UserInterface in action args Added notes about the `UserInterface` added in symfony/symfony#18510, was waiting for the in-deprecation of the `getUser()` method: symfony/symfony#19452. Commits ------- 7849fa2 Added docs mentioning UserInterface in action args
Ah thanks! I completely forgot about the reply |
Added notes about the
UserInterface
added in symfony/symfony#18510, was waiting for the in-deprecation of thegetUser()
method: symfony/symfony#19452.