Skip to content

Move isOffsetAccessLegal to MaybeOffsetAccessibleTypeTrait #4205

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
merged 1 commit into from
Aug 5, 2025

Conversation

VincentLanglet
Copy link
Contributor

Is there a reason for not having this offset-related method in the MaybeOffsetAccessibleTypeTrait when all the implementation returns maybe (?)

@ondrejmirtes
Copy link
Member

I'm fine with this, although I'm not a fan of these traits at all.

I can tolerate them, but I'd really like some custom rules around them (like that if a class is using the trait, it has to use the whole trait and not override any of its methods).

@ondrejmirtes ondrejmirtes merged commit 605b7a6 into phpstan:2.1.x Aug 5, 2025
438 of 447 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

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