-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Deprecate PassportInterface
#42198
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
PassportInterface
PassportInterface
PassportInterface
PassportInterface
b001801
to
0652225
Compare
PassportInterface
PassportInterface
0652225
to
c1c2d5b
Compare
*/ | ||
public function authenticate(Request $request): PassportInterface; | ||
public function authenticate(Request $request); /*: Passport;*/ |
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.
Well, maybe we should keep the existing return type while documenting the new one, instead of widening the explicit return type now (the new one is only documented anyway).
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.
👍 if the DebugClassLoader
still correctly reports the deprecation.
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.
Keeping the return type would forbid upgrading userland authenticators on PHP versions prior to 7.4 https://3v4l.org/LcLRN#veol
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 don't see much issue in requiring a user to be on PHP 7.4 to fix a deprecation (i.e. it's not breaking support for older versions, it's just triggering a deprecation if you stay on : PassportInterface
). They would need PHP 8 anyways if they want to upgrade to Symfony 6 and even PHP 7.4 will be eom when we release Symfony 5.4.
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.
Pushing our users to upgrade their PHP versions has never been our take, at least not by making symfony upgrades harder. Moreover, that would break our CI on 7.2 given that core authenticators have been upgraded.
e2dfd5f
to
db572e3
Compare
PassportInterface
PassportInterface
db572e3
to
234a423
Compare
Renamed PR is ready. |
src/Symfony/Component/Security/Http/Authenticator/AuthenticatorInterface.php
Outdated
Show resolved
Hide resolved
234a423
to
a446030
Compare
Thank you @chalasr. |
As explained in #42181, the right extension point is badges, not passports.
Also renames
AuthenticatorInterface::createAuthenticatedToken()
tocreateToken()
because of the signature change and the recent abandon of theauthenticated
state for tokens.