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

feat: add isOptionalProperty method to ObjectShapeType #4329

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

Open
calebdw wants to merge 1 commit into phpstan:2.1.x
base: 2.1.x
Choose a base branch
Loading
from calebdw:calebdw/push-kqqsyzltvulo

Conversation

Copy link
Contributor

@calebdw calebdw commented Sep 13, 2025

Hello!

While I was digging around, I noticed that the ConstantArrayType has a similar method and figured it would be nice to have here as well.

Thanks!

Copy link
Member

What's your use case? Also, take a look where the ConstantArrayType method is used, and think about whether we're missing something with ObjectShapeType or not.

@calebdw calebdw force-pushed the calebdw/push-kqqsyzltvulo branch from 751fe71 to c131109 Compare September 13, 2025 12:35
Copy link
Contributor Author

calebdw commented Sep 13, 2025

I don't have a specific use case, I just saw this on the array type and thought it might clean up all the in_array calls, if you'd rather not have it then feel free to close

Also, take a look where the ConstantArrayType method is used, and think about whether we're missing something with ObjectShapeType or not.

I'm not sure what you're trying to get at here, it looks like isOptionalKey() is used in several places like when building a new array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

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