-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Don't mention the UserInterface type-hinting #9060
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
} | ||
|
||
.. tip:: | ||
|
||
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 ability to get the user by type-hinting an argument with UserInterface | ||
was introduced in Symfony 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.
Could move this to the code block somewhere around: https://github.com/symfony/symfony-docs/pull/9060/files#diff-d1c69ceaea98cb0458d71feab0760245R1036
My changes are wrong because a) Never use it or mention on Symfony Docs I thought we were going for (a). Ping @weaverryan @chalasr @xabbuh |
I am not sure I follow what you would like to fix or at which stage we are right now. |
@xabbuh we introduced So, we need to make a definitive decision about |
|
@iltar if we do that, it'd be better if we type-hint the new |
That would be an extra action and an extra dependency, which would beat the purpose imo |
This is definitely true! :) But we don't need to give this group very much help - it's a very small and very intelligent group. The problem with type-hinting is that it's not "discoverable": I can't think about my code or dig around and realize that I still think we should go with I know we disagree on this @iltar :). But the DX looks bad for |
As long as the feature is documented somewhere, I'm 👍 Would be a bit troublesome to have undocumented features, might as well remove them in that case. |
@javiereguiluz can you update you the PR - let's look for all |
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.
For the record, I do love the security user value resolver and use it over the controller shortcut, but I can understand that the shortcut is preferred for the docs.
This fixes #7506. Ping @iltar.