Skip to content
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

Analyse if we should start checking (4.4 and up) for setAccessible() reflection uses #159

Open
stronk7 opened this issue Apr 23, 2024 · 2 comments

Comments

@stronk7
Copy link
Member

stronk7 commented Apr 23, 2024

The setAccessible() methods are, since PHP 8.1 no-op. That implies that, since Moodle 4.4.0 (that requires PHP 8.1), there shouldn't be any use in core.

This issue is about to check if PHPCompatibility already has that and, depending on that, decide how we incorporate that check for us (importing if PHPCompatibility has it, implementing ir here, maybe as part of some deprecated processor, or just manually, we already have some similar sniffs looking for forbidden and other functions...)

Ciao :-)

@paulholden
Copy link
Member

This would help to prevent undoing all the work you did in MDL-75952 (which has already started 😢 )

@andrewnicols
Copy link
Contributor

I feel that we would be best to look at doing this with psalm or phpstan. This really feels like a task for static analysis rather than a style sniff.

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

No branches or pull requests

3 participants