-
Task
-
Resolution: Unresolved
-
Minor
-
None
-
5.1
-
None
-
MOODLE_501_STABLE
Replace Deprecated PHPUnit annotations with Attributes.
Note: This is only possible for Moodle 5.0 onwards and we want to be a little careful applying these and deciding when to do so.
We could do so immediately for 5.1 and can optinoally backport these to 5.0 if we wanted but not to 4.x.
I would suggest it may be better to wait another 6 months and apply these in 5.2 when generals support ends for Moodle 4.5 (and it moves to security support only).
We also need to look at our phpcs rules because they are currently only aware of the PHP Annotations, and not the PHP Attributes.
Note: I've written rules for PHP Rector to update all of the attributes to annotations so if someone picks this up, please don't do this manually.
https://getrector.com/find-rule?activeRectorSetGroup=phpunit&rectorSet=phpunit-phpunitphpunit-100
See MDL-84204 for configuration for this.