Background:
Inspired up the just-released PHPUnit 9.6.21: https://github.com/sebastianbergmann/phpunit/issues/5956, which removes use of this constant to avoid deprecation warnings in PHP 8.4.
- PHP 7.0 removes use of E_STRICT: https://wiki.php.net/rfc/reclassify_e_strict
- PHP 8.4 deprecates the E_STRICT constant: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant
Task:
MediaWiki does not "use" E_STRICT for any of its own warnings. However, we do allow PHP itself and other code to use it, and thus our general error handlers do reference this constant in order to check whether it is used. This is enough to trigger a warning when running MediaWiki on PHP 8.4 or later.
Given that this is no longer used, we can remove it in most cases. The exception is perhaps the "MWExceptionHandler" where we can use the same approach as PHPUnit to cast it to E_NOTICE.
See also: Codesearch for E_STRICT