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: checking optional properties in object shapes #4328

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

Merged
ondrejmirtes merged 1 commit into phpstan:2.1.x from calebdw:calebdw/push-mszlmotvuumk
Sep 15, 2025

Conversation

Copy link
Contributor

@calebdw calebdw commented Sep 13, 2025
edited
Loading

Hello!

Closes phpstan/phpstan#13511

By the time the getProperty() method is called, the $hasProperty has already been narrowed to maybe or it's been determined to be optional and overridden to yes. We should simply continue instead of returning no

Thanks!

@calebdw calebdw force-pushed the calebdw/push-mszlmotvuumk branch 2 times, most recently from 0c408b3 to bae03bd Compare September 13, 2025 01:44
Copy link
Contributor

staabm commented Sep 13, 2025

don't get confused by the CI results.. we currently investigate spurious CI errors

calebdw reacted with thumbs up emoji

@calebdw calebdw force-pushed the calebdw/push-mszlmotvuumk branch from bae03bd to d28fb04 Compare September 13, 2025 12:34
@calebdw calebdw force-pushed the calebdw/push-mszlmotvuumk branch from d28fb04 to 692b5be Compare September 13, 2025 12:35
@ondrejmirtes ondrejmirtes merged commit 330ca96 into phpstan:2.1.x Sep 15, 2025
443 of 456 checks passed
Copy link
Member

Thank you!

calebdw reacted with thumbs up emoji

@calebdw calebdw deleted the calebdw/push-mszlmotvuumk branch September 15, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@ondrejmirtes ondrejmirtes ondrejmirtes requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

argument.type error reported when object doesn't have optional type

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