PHP 8.4 | Remove use of `E_STRICT` (#12116)
The `E_STRICT` constant is deprecated as of PHP 8.4 and will be removed in PHP 9.0 (commit finally went in today). The error level hasn't been in use since PHP 8.0 anyway and was only barely still used in PHP 7.x, so removing the exclusion from the `error_reporting()` setting in these script shouldn't really make any difference in practice. Ref: * https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>pull/12119/head
parent
dea55ec139
commit
8ae6fa1205
|
@ -78,7 +78,7 @@ class ErrorHandler
|
||||||
public static function register(?IOInterface $io = null): void
|
public static function register(?IOInterface $io = null): void
|
||||||
{
|
{
|
||||||
set_error_handler([__CLASS__, 'handle']);
|
set_error_handler([__CLASS__, 'handle']);
|
||||||
error_reporting(E_ALL | E_STRICT);
|
error_reporting(E_ALL);
|
||||||
self::$io = $io;
|
self::$io = $io;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ class Silencer
|
||||||
public static function suppress(?int $mask = null): int
|
public static function suppress(?int $mask = null): int
|
||||||
{
|
{
|
||||||
if (!isset($mask)) {
|
if (!isset($mask)) {
|
||||||
$mask = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED | E_STRICT;
|
$mask = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED;
|
||||||
}
|
}
|
||||||
$old = error_reporting();
|
$old = error_reporting();
|
||||||
self::$stack[] = $old;
|
self::$stack[] = $old;
|
||||||
|
|
Loading…
Reference in New Issue