Skip to content

Conversation

@wouterj
Copy link
Member

@wouterj wouterj commented Mar 17, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR symfony/symfony-docs#13362

While writing the docs, I had the idea to also allow passing a TokenInterface to this login. This also allows to use this method when your application requires a specific token to be present (e.g. a custom token or when you're using instanceof checks).

Meanwhile, I also applied the get_debug_type() usage introduced in #35945

@javiereguiluz
Copy link
Member

javiereguiluz commented Mar 17, 2020

I don't know how common is to use this "token" instead of a regular user ... but if it's not common enough, I don't think we should support this feature.

If you think it's common enough ... I don't think we should change the loginUser() method. We'd lose the argument type-hint, the explanation would be more complex, etc. We could consider adding a loginToken() method?

@wouterj
Copy link
Member Author

wouterj commented Mar 19, 2020

Agreed. Let's not make this more complex at first. As there is no typehint (to make the error more user friendly), we can always add this functionality in future releases if there is a need.

@wouterj wouterj closed this Mar 19, 2020
@wouterj wouterj deleted the patch-18 branch March 19, 2020 14:41
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