Skip to content

Support for specific user instances to be resolved #32407

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

Closed
wants to merge 1 commit into from

Conversation

gmponos
Copy link
Contributor

@gmponos gmponos commented Jul 6, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

[ ] - Need to add tests
[ ] - Need to update changelog

At the moment if my application supports multiple users I have to do this:

public function __invoke(UserInterface $user): Response {
    ...
    if ($user instance of JwtUser) {

    }
    ....
}

With the proposed change I can autowire directly the specific UserInstance

public function __invoke(JWTUser $user): Response

if you have any objections let me know in order not to proceed with the tests.

@linaori
Copy link
Contributor

linaori commented Jul 6, 2019

Please see #26971

@gmponos
Copy link
Contributor Author

gmponos commented Jul 6, 2019

Closing.. as there was already a PR for this and the discussion can be continued there

@gmponos gmponos closed this Jul 6, 2019
@gmponos gmponos deleted the patch-4 branch July 30, 2020 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants