Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] DeprecatePassportInterface#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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4fromchalasr:burn-passport-inter
Aug 6, 2021

Conversation

@chalasr
Copy link
Member

@chalasrchalasr commentedJul 19, 2021
edited
Loading

QA
Branch?5.4
Bug fix?no
New feature?no
Deprecations?yes
Tickets-
LicenseMIT
Doc PR-

As explained in#42181, the right extension point is badges, not passports.

Also renamesAuthenticatorInterface::createAuthenticatedToken() tocreateToken() because of the signature change and the recent abandon of theauthenticated state for tokens.

@chalasrchalasr requested a review fromwouterj as acode ownerJuly 19, 2021 19:13
@carsonbotcarsonbot changed the title[Security] DeprecatePassportInterfaceDeprecatePassportInterfaceJul 19, 2021
@carsonbotcarsonbot changed the titleDeprecatePassportInterface[Security] DeprecatePassportInterfaceJul 19, 2021
@wouterjwouterj added this to the5.4 milestoneJul 19, 2021
@wouterjwouterj changed the title[Security] DeprecatePassportInterface[WIP] [Security] DeprecatePassportInterfaceJul 19, 2021
* @return Passport
*/
publicfunctionauthenticate(Request$request):PassportInterface;
publicfunctionauthenticate(Request$request);/*: Passport;*/
Copy link
Member

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).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍 if theDebugClassLoader still correctly reports the deprecation.

Copy link
MemberAuthor

@chalasrchalasrJul 23, 2021
edited
Loading

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.4https://3v4l.org/LcLRN#veol

Copy link
Member

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.

Copy link
MemberAuthor

@chalasrchalasrJul 24, 2021
edited
Loading

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.

@chalasrchalasrforce-pushed theburn-passport-inter branch 5 times, most recently frome2dfd5f todb572e3CompareJuly 23, 2021 22:36
@chalasrchalasr changed the title[WIP] [Security] DeprecatePassportInterface[Security] DeprecatePassportInterfaceJul 23, 2021
@chalasr
Copy link
MemberAuthor

RenamedcreateAuthenticatedToken() tocreateToken because of the argument type change which is BC breaking on PHP < 7.4.
That seems to be a good move anyway as 6.0 does not haveauthenticated tokens, just tokens (#42050).

PR is ready.

@fabpot
Copy link
Member

Thank you@chalasr.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@wouterjwouterjwouterj left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@chalasr@fabpot@stof@wouterj@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp