Skip to content

Add stringable access check to AccessPropertiesCheck #4094

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
wants to merge 1 commit into
base: 2.1.x
Choose a base branch
from

Conversation

zonuexe
Copy link
Contributor

@zonuexe zonuexe commented Jul 13, 2025

refs phpstan/phpstan#13238

In the context of property fetching, string keys are implicitly cast.

Property names starting with a number cannot be defined, but there is no need to exclude numeric, as they are accessible via the __get() magic method.


For work reasons, this branch is based on #3910, so it will be rebased once that is merged.

@zonuexe
Copy link
Contributor Author

zonuexe commented Jul 13, 2025

(I'll get home in a few hours and fix it.)

@zonuexe zonuexe marked this pull request as draft July 13, 2025 12:34
@zonuexe zonuexe force-pushed the feature/property-dynamic-access-stringable-rule branch 6 times, most recently from 680322d to dd89d2d Compare July 13, 2025 14:36
@zonuexe zonuexe marked this pull request as ready for review July 13, 2025 14:43
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@zonuexe zonuexe force-pushed the feature/property-dynamic-access-stringable-rule branch from dd89d2d to 88823c7 Compare July 13, 2025 14:58
@zonuexe zonuexe force-pushed the feature/property-dynamic-access-stringable-rule branch from 88823c7 to 12c1aee Compare July 13, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants