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

[Messenger] Removes deprecated call to ReflectionType::__toString() on MessengerPass#32398

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
Tobion merged 1 commit intosymfony:4.2fromvolkyeth:32397-remove-reflectiontype-tostring
Jul 6, 2019
Merged

[Messenger] Removes deprecated call to ReflectionType::__toString() on MessengerPass#32398

Tobion merged 1 commit intosymfony:4.2fromvolkyeth:32397-remove-reflectiontype-tostring
Jul 6, 2019

Conversation

@volkyeth
Copy link

Closes#32397

QA
Branch?4.3
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#32397
LicenseMIT
Doc PR-

Removes deprecated call to ReflectionType::__toString() for 7.4 support

@Tobion
Copy link
Contributor

Should be fixed in 4.2

@derrabus
Copy link
Member

Is this the only place where we do that cast?

}

return [(string)$parameters[0]->getType()];
return [$parameters[0]->getType()->getName()];
Copy link
Contributor

@TobionTobionJul 5, 2019
edited
Loading

Choose a reason for hiding this comment

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

it seemsgetName only exists on ReflectionNamedTypehttps://www.php.net/manual/en/reflectionnamedtype.getname.php andhttps://php.net/manual/en/reflectionparameter.gettype.php says it only returns ReflectionType. So getName would not be safe to call here.
But that looks like the php doc is wrong. When the param does not have a typegetType returns null. So getType always returns ReflectionNamedType|null, seehttps://3v4l.org/W1PUh

Copy link
Author

Choose a reason for hiding this comment

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

That's because currently, ReflectionNamedType is the only subtype of ReflectionType
ref:phpstan/phpstan#1133 (comment)

@volkyeth
Copy link
Author

Is this the only place where we do that cast?

Not sure. That's the only one that triggered the Deprecation notice on my test suite, tough

@volkyeth
Copy link
Author

Should be fixed in 4.2

you mean I should retarget this PR to the 4.2 branch?
@Tobion

Should be fixed in 4.2

Do you mean I should retarget this PR to the 4.2 branch or do another one for that one?
This is my first time doing a PR here...not sure how the backports work

@xabbuhxabbuh added this to the4.2 milestoneJul 6, 2019
@xabbuh
Copy link
Member

@brunowowk Yes, we always apply bugfixes to the lowest maintained branch where the bug occurs. From there we regularly merge branches up into all other still maintained branches.

volkyeth reacted with thumbs up emoji

@volkyethvolkyeth changed the base branch from4.3 to4.2July 6, 2019 17:58
@volkyeth
Copy link
Author

Done ✌️

@Tobion
Copy link
Contributor

Thank you@brunowowk.

derrabus reacted with hooray emojivolkyeth reacted with rocket emoji

@TobionTobion merged commit0c52a53 intosymfony:4.2Jul 6, 2019
Tobion added a commit that referenced this pull requestJul 6, 2019
…oString() on MessengerPass (brunowowk)This PR was merged into the 4.2 branch.Discussion----------[Messenger] Removes deprecated call to ReflectionType::__toString() on MessengerPassCloses#32397| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#32397| License       | MIT| Doc PR        | -Removes deprecated call to ReflectionType::__toString() for 7.4 supportCommits-------0c52a53 Remove call to deprecated method
@derrabus
Copy link
Member

This is my first time doing a PR here...

Congratulations on your first contribution. 😃

volkyeth reacted with laugh emojivolkyeth and yceruto reacted with hooray emoji

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

Reviewers

@derrabusderrabusderrabus approved these changes

+1 more reviewer

@TobionTobionTobion left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

5 participants

@volkyeth@Tobion@derrabus@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp