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

Fix '?' in ReflectionNamedType::getName() from ReflectionProperty::getSettableType() #19201

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
iluuu1994 wants to merge 2 commits into php:PHP-8.4 from iluuu1994:gh-19187

Conversation

Copy link
Member

@iluuu1994 iluuu1994 commented Jul 21, 2025

No description provided.

echo $reflProp->getSettableType()->getName(), "\n";

?>
--EXPECT--
Copy link
Member

@DanielEScherzer DanielEScherzer Jul 21, 2025

Choose a reason for hiding this comment

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

Hmm, can you also include the output of __toString() and allowsNull() to confirm that the nullability is still communicated?

Copy link
Member Author

@iluuu1994 iluuu1994 Jul 21, 2025

Choose a reason for hiding this comment

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

Done. Also added a test for the fallback path when no set is present.

Copy link
Member

Should this target master rather than 8.4, given that it changes the output? Otherwise looks good to me

Copy link
Member Author

Should this target master rather than 8.4, given that it changes the output?

I don't know whether this qualifies as a bug. When I implemented this function I wasn't aware "legacy behavior" is still widely applied, and it does seem like getSettableType() is the oddball. If you prefer I can target master.

Copy link
Member

Should this target master rather than 8.4, given that it changes the output?

I don't know whether this qualifies as a bug. When I implemented this function I wasn't aware "legacy behavior" is still widely applied, and it does seem like getSettableType() is the oddball. If you prefer I can target master.

Given that this might be a silent failure for any code checking the result and expecting it not to change without notice, I'd say that this should target master

iluuu1994 reacted with thumbs up emoji

Copy link
Member Author

Okay, I'll merge this into master instead then.

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

@DanielEScherzer DanielEScherzer DanielEScherzer approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /