Modernizes the code using automated tools. Most commonly adds the PHP 8.3 #[Override] attribute. The attribute checks at compile time that the method is indeed overriding something and throws an error if it's not.
Other changes include:
all global namespace classes are imported for consistency
anonymous functions have been changed to short closures where applicable
get_class() function call has been replaced with static ::class
unused caught exception variables have been removed
the Stringable interface is now implemented explicitly instead of implicitly
Note that all of this will be automatically reversed when releasing for older versions.
Checklist:
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules
Description
Modernizes the code using automated tools. Most commonly adds the PHP 8.3 #[Override] attribute. The attribute checks at compile time that the method is indeed overriding something and throws an error if it's not.
Other changes include:
get_class()
function call has been replaced with static::class
Stringable
interface is now implemented explicitly instead of implicitlyNote that all of this will be automatically reversed when releasing for older versions.
Checklist: