Open stronk7 opened 7 months ago
This would help to prevent undoing all the work you did in MDL-75952 (which has already started :cry: )
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.
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 :-)