From d313ad6098430f4e61f0121a9e7ab392d195e4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sat, 30 Dec 2023 13:57:05 +0100 Subject: [PATCH] Deprecate E_STRICT constant and remove error level RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant Closes GH-13053 --- UPGRADING | 3 + Zend/tests/ErrorException_getSeverity.phpt | 246 ++++++------------ Zend/tests/bug33771.phpt | 6 +- Zend/tests/bug81652.phpt | 4 +- Zend/tests/e_strict-deprecated.phpt | 14 + Zend/tests/error_reporting01.phpt | 2 +- Zend/tests/error_reporting02.phpt | 2 +- Zend/tests/error_reporting03.phpt | 2 +- Zend/tests/error_reporting04.phpt | 2 +- Zend/tests/error_reporting05.phpt | 2 +- Zend/tests/error_reporting06.phpt | 2 +- Zend/tests/error_reporting07.phpt | 2 +- Zend/tests/error_reporting08.phpt | 2 +- Zend/tests/error_reporting09.phpt | 2 +- Zend/tests/error_reporting10.phpt | 4 +- Zend/tests/throw/leaks.phpt | 2 +- Zend/zend.c | 1 - Zend/zend_constants.stub.php | 2 + Zend/zend_constants_arginfo.h | 4 +- Zend/zend_errors.h | 3 +- .../tests/file/parse_ini_file_variation3.phpt | 2 +- .../tests/general_functions/bug70157.phpt | 2 +- .../general_functions/parse_ini_booleans.phpt | 10 +- main/main.c | 4 - php.ini-development | 10 +- php.ini-production | 12 +- run-tests.php | 1 - sapi/fpm/tests/config-array.phpt | 2 +- tests/func/bug64523.phpt | 2 +- 29 files changed, 141 insertions(+), 211 deletions(-) create mode 100644 Zend/tests/e_strict-deprecated.phpt diff --git a/UPGRADING b/UPGRADING index e58fb9ebbfe..ea6f9e79c75 100644 --- a/UPGRADING +++ b/UPGRADING @@ -44,6 +44,9 @@ PHP 8.4 UPGRADE NOTES As such, passing invalid types to exit/die may now result in a TypeError being thrown. RFC: https://wiki.php.net/rfc/exit-as-function + . The E_STRICT constant was deprecated and its corresponding error level was + removed. + RFC: https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant - DBA: . dba_open() and dba_popen() will now return a Dba\Connection diff --git a/Zend/tests/ErrorException_getSeverity.phpt b/Zend/tests/ErrorException_getSeverity.phpt index 2673065a875..ba900ce19e8 100644 --- a/Zend/tests/ErrorException_getSeverity.phpt +++ b/Zend/tests/ErrorException_getSeverity.phpt @@ -192,18 +192,6 @@ try { var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG); } -try { - throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT); -} catch(ErrorException $e) { - echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity(); - var_dump($e->getSeverity() === E_STRICT); - var_dump($e->getMessage() === EXCEPTION_PARAM_MSG); - var_dump($e->getCode() === 0); - var_dump($e->getPrevious() === NULL); - var_dump($e->getFile() === __FILE__); - var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG); -} - try { throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR); } catch(ErrorException $e) { @@ -384,18 +372,6 @@ try { var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG); } -try { - throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__); -} catch(ErrorException $e) { - echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity(); - var_dump($e->getSeverity() === E_STRICT); - var_dump($e->getMessage() === EXCEPTION_PARAM_MSG); - var_dump($e->getCode() === 0); - var_dump($e->getPrevious() === NULL); - var_dump($e->getFile() === __FILE__); - var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG); -} - try { throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__); } catch(ErrorException $e) { @@ -576,18 +552,6 @@ try { var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG); } -try { - throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__); -} catch(ErrorException $e) { - echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity(); - var_dump($e->getSeverity() === E_STRICT); - var_dump($e->getMessage() === EXCEPTION_PARAM_MSG); - var_dump($e->getCode() === 0); - var_dump($e->getPrevious() === NULL); - var_dump($e->getFile() === __FILE__); - var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG); -} - try { throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__, __LINE__); } catch(ErrorException $e) { @@ -813,22 +777,6 @@ try { } } -try { - throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__, NULL); -} catch(Exception $exceptionErr) { - try { - throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__, $exceptionErr->getPrevious()); - } catch(ErrorException $e) { - echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity(); - var_dump($e->getSeverity() === E_STRICT); - var_dump($e->getMessage() === EXCEPTION_PARAM_MSG); - var_dump($e->getCode() === 0); - var_dump($e->getPrevious() === NULL); - var_dump($e->getFile() === __FILE__); - var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG); - } -} - try { throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__, __LINE__, NULL); } catch(Exception $exceptionErr) { @@ -953,7 +901,91 @@ bool(true) bool(true) bool(true) bool(true) -This exception severity is: 2048bool(true) +This exception severity is: 4096bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 8192bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 16384bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 1bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 2bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 4bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 8bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 16bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 32bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 32bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 64bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 128bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 256bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 512bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +This exception severity is: 1024bool(true) bool(true) bool(true) bool(true) @@ -1049,108 +1081,6 @@ bool(true) bool(true) bool(true) bool(true) -This exception severity is: 2048bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 4096bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 8192bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 16384bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 1bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 2bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 4bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 8bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 16bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 32bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 32bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 64bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 128bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 256bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 512bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 1024bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -This exception severity is: 2048bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) This exception severity is: 4096bool(true) bool(true) bool(true) @@ -1241,12 +1171,6 @@ bool(true) bool(true) bool(true) bool(true) -This exception severity is: 2048bool(true) -bool(true) -bool(true) -bool(true) -bool(true) -bool(true) This exception severity is: 4096bool(true) bool(true) bool(true) diff --git a/Zend/tests/bug33771.phpt b/Zend/tests/bug33771.phpt index 368a1662a8f..b74b5be5fb6 100644 --- a/Zend/tests/bug33771.phpt +++ b/Zend/tests/bug33771.phpt @@ -34,7 +34,7 @@ var_dump(error_reporting()); echo "Done\n"; ?> --EXPECT-- -int(32767) -int(32767) -int(32759) +int(30719) +int(30719) +int(30711) Done diff --git a/Zend/tests/bug81652.phpt b/Zend/tests/bug81652.phpt index d0fa78b23e1..a115f590add 100644 --- a/Zend/tests/bug81652.phpt +++ b/Zend/tests/bug81652.phpt @@ -18,5 +18,5 @@ var_dump(error_reporting()); ?> --EXPECT-- -int(32767) -int(32767) +int(30719) +int(30719) diff --git a/Zend/tests/e_strict-deprecated.phpt b/Zend/tests/e_strict-deprecated.phpt new file mode 100644 index 00000000000..71666e75c22 --- /dev/null +++ b/Zend/tests/e_strict-deprecated.phpt @@ -0,0 +1,14 @@ +--TEST-- +The E_STRICT constant is deprecated +--FILE-- + +--EXPECTF-- +int(30719) + +Deprecated: Constant E_STRICT is deprecated in %s on line %d +int(2048) diff --git a/Zend/tests/error_reporting01.phpt b/Zend/tests/error_reporting01.phpt index 97524b43fd2..276cb08b75f 100644 --- a/Zend/tests/error_reporting01.phpt +++ b/Zend/tests/error_reporting01.phpt @@ -22,5 +22,5 @@ var_dump(error_reporting()); echo "Done\n"; ?> --EXPECT-- -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting02.phpt b/Zend/tests/error_reporting02.phpt index 5caf265d76d..6750d6b0913 100644 --- a/Zend/tests/error_reporting02.phpt +++ b/Zend/tests/error_reporting02.phpt @@ -23,5 +23,5 @@ var_dump(error_reporting()); echo "Done\n"; ?> --EXPECT-- -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting03.phpt b/Zend/tests/error_reporting03.phpt index d6c442bebb0..9f00a2dab8b 100644 --- a/Zend/tests/error_reporting03.phpt +++ b/Zend/tests/error_reporting03.phpt @@ -31,5 +31,5 @@ echo "Done\n"; ?> --EXPECTF-- Warning: Undefined variable $undef2 in %s on line %d -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting04.phpt b/Zend/tests/error_reporting04.phpt index f53565de9e2..8818215941c 100644 --- a/Zend/tests/error_reporting04.phpt +++ b/Zend/tests/error_reporting04.phpt @@ -19,5 +19,5 @@ echo "Done\n"; ?> --EXPECTF-- Warning: Undefined variable $undef in %s on line %d -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting05.phpt b/Zend/tests/error_reporting05.phpt index 9ffd3971a12..e989982fe00 100644 --- a/Zend/tests/error_reporting05.phpt +++ b/Zend/tests/error_reporting05.phpt @@ -30,5 +30,5 @@ echo "Done\n"; Warning: Undefined variable $undef_value in %s on line %d Warning: Undefined variable $undef_name in %s on line %d -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting06.phpt b/Zend/tests/error_reporting06.phpt index 809c1d614bb..004a93f5b6b 100644 --- a/Zend/tests/error_reporting06.phpt +++ b/Zend/tests/error_reporting06.phpt @@ -26,5 +26,5 @@ var_dump(error_reporting()); echo "Done\n"; ?> --EXPECT-- -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting07.phpt b/Zend/tests/error_reporting07.phpt index 8b57847b0b0..99cf55230aa 100644 --- a/Zend/tests/error_reporting07.phpt +++ b/Zend/tests/error_reporting07.phpt @@ -26,5 +26,5 @@ var_dump(error_reporting()); echo "Done\n"; ?> --EXPECT-- -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting08.phpt b/Zend/tests/error_reporting08.phpt index 2450abfc679..3e26965a809 100644 --- a/Zend/tests/error_reporting08.phpt +++ b/Zend/tests/error_reporting08.phpt @@ -28,5 +28,5 @@ echo "Done\n"; ?> --EXPECTF-- Warning: Undefined variable $undef3 in %s on line %d -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting09.phpt b/Zend/tests/error_reporting09.phpt index 39e52adbf54..2636652278f 100644 --- a/Zend/tests/error_reporting09.phpt +++ b/Zend/tests/error_reporting09.phpt @@ -27,5 +27,5 @@ echo "Done\n"; Warning: Undefined variable $blah in %s on line %d Warning: Undefined variable $undef2 in %s on line %d -int(32767) +int(30719) Done diff --git a/Zend/tests/error_reporting10.phpt b/Zend/tests/error_reporting10.phpt index c3ad2668cdc..398784ac37e 100644 --- a/Zend/tests/error_reporting10.phpt +++ b/Zend/tests/error_reporting10.phpt @@ -29,6 +29,6 @@ var_dump(error_reporting()); echo "Done\n"; ?> --EXPECT-- -int(32767) -int(32759) +int(30719) +int(30711) Done diff --git a/Zend/tests/throw/leaks.phpt b/Zend/tests/throw/leaks.phpt index 0f9311a820c..9249213801c 100644 --- a/Zend/tests/throw/leaks.phpt +++ b/Zend/tests/throw/leaks.phpt @@ -31,4 +31,4 @@ new stdClass(exit); Caught Caught Caught -int(32767) +int(30719) diff --git a/Zend/zend.c b/Zend/zend.c index 0d4ec7388b1..b772f76f80e 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1604,7 +1604,6 @@ static ZEND_COLD void get_filename_lineno(int type, zend_string **filename, uint case E_COMPILE_WARNING: case E_ERROR: case E_NOTICE: - case E_STRICT: case E_DEPRECATED: case E_WARNING: case E_USER_ERROR: diff --git a/Zend/zend_constants.stub.php b/Zend/zend_constants.stub.php index 014ae748f3a..ee67966c015 100644 --- a/Zend/zend_constants.stub.php +++ b/Zend/zend_constants.stub.php @@ -71,6 +71,8 @@ const E_USER_NOTICE = UNKNOWN; /** * @var int * @cvalue E_STRICT + * @deprecated + * @todo Remove in PHP 9.0 */ const E_STRICT = UNKNOWN; diff --git a/Zend/zend_constants_arginfo.h b/Zend/zend_constants_arginfo.h index 8c1846aa97e..8d42345ad69 100644 --- a/Zend/zend_constants_arginfo.h +++ b/Zend/zend_constants_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 1da352eeafa0d33ddda4171cca4c7bf18313915f */ + * Stub hash: 65be08c1bdace83ad1fa1175fc824262e07eac2a */ static void register_zend_constants_symbols(int module_number) { @@ -14,7 +14,7 @@ static void register_zend_constants_symbols(int module_number) REGISTER_LONG_CONSTANT("E_USER_ERROR", E_USER_ERROR, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("E_USER_WARNING", E_USER_WARNING, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("E_USER_NOTICE", E_USER_NOTICE, CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("E_STRICT", E_STRICT, CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("E_STRICT", E_STRICT, CONST_PERSISTENT | CONST_DEPRECATED); REGISTER_LONG_CONSTANT("E_RECOVERABLE_ERROR", E_RECOVERABLE_ERROR, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("E_DEPRECATED", E_DEPRECATED, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("E_USER_DEPRECATED", E_USER_DEPRECATED, CONST_PERSISTENT); diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h index dd7539523db..954be61a0ae 100644 --- a/Zend/zend_errors.h +++ b/Zend/zend_errors.h @@ -31,6 +31,7 @@ #define E_USER_ERROR (1<<8L) #define E_USER_WARNING (1<<9L) #define E_USER_NOTICE (1<<10L) +// TODO: Remove in PHP 9.0 #define E_STRICT (1<<11L) #define E_RECOVERABLE_ERROR (1<<12L) #define E_DEPRECATED (1<<13L) @@ -39,7 +40,7 @@ /* Indicates that this usually fatal error should not result in a bailout */ #define E_DONT_BAIL (1<<15L) -#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED | E_STRICT) +#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED) #define E_CORE (E_CORE_ERROR | E_CORE_WARNING) /* Fatal errors that are ignored by the silence operator */ diff --git a/ext/standard/tests/file/parse_ini_file_variation3.phpt b/ext/standard/tests/file/parse_ini_file_variation3.phpt index b3f565af89d..29e620dc8da 100644 --- a/ext/standard/tests/file/parse_ini_file_variation3.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation3.phpt @@ -70,7 +70,7 @@ foreach($newdirs as $newdir) { New include path is : %sparse_ini_file_variation3.dir1%sparse_ini_file_variation3.dir2%sparse_ini_file_variation3.dir3%S array(9) { ["error_reporting"]=> - string(5) "32767" + string(5) "30719" ["display_errors"]=> string(1) "1" ["display_startup_errors"]=> diff --git a/ext/standard/tests/general_functions/bug70157.phpt b/ext/standard/tests/general_functions/bug70157.phpt index 815ccdcf966..748435dde6d 100644 --- a/ext/standard/tests/general_functions/bug70157.phpt +++ b/ext/standard/tests/general_functions/bug70157.phpt @@ -21,7 +21,7 @@ array(%d) { ["foo"]=> array(%d) { [123]=> - int(24575) + int(22527) [456]=> int(123) } diff --git a/ext/standard/tests/general_functions/parse_ini_booleans.phpt b/ext/standard/tests/general_functions/parse_ini_booleans.phpt index 3868147e626..14459626c7f 100644 --- a/ext/standard/tests/general_functions/parse_ini_booleans.phpt +++ b/ext/standard/tests/general_functions/parse_ini_booleans.phpt @@ -15,17 +15,17 @@ array(3) { ["error_reporting values"]=> array(6) { ["foo"]=> - string(7) "32767 8" + string(7) "30719 8" ["error_reporting"]=> - string(5) "32767" + string(5) "30719" ["error_reporting1"]=> string(4) "4177" ["error_reporting2"]=> - string(5) "32759" + string(5) "30711" ["error_reporting3"]=> - string(5) "32759" + string(5) "30711" ["error_reporting4"]=> - string(5) "32759" + string(5) "30711" } ["true or false"]=> array(8) { diff --git a/main/main.c b/main/main.c index d31de566f48..e33bb0724c0 100644 --- a/main/main.c +++ b/main/main.c @@ -1369,10 +1369,6 @@ static ZEND_COLD void php_error_cb(int orig_type, zend_string *error_filename, c error_type_str = "Notice"; syslog_type_int = LOG_NOTICE; break; - case E_STRICT: - error_type_str = "Strict Standards"; - syslog_type_int = LOG_INFO; - break; case E_DEPRECATED: case E_USER_DEPRECATED: error_type_str = "Deprecated"; diff --git a/php.ini-development b/php.ini-development index 3fd5fd578ee..6e5064dd447 100644 --- a/php.ini-development +++ b/php.ini-development @@ -107,7 +107,7 @@ ; error_reporting ; Default Value: E_ALL ; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT +; Production Value: E_ALL & ~E_DEPRECATED ; log_errors ; Default Value: Off @@ -442,7 +442,7 @@ memory_limit = 128M ; operators. The error level constants are below here for convenience as well as ; some common settings and their meanings. ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and +; those related to E_NOTICE, which together cover best practices and ; recommended coding standards in PHP. For performance reasons, this is the ; recommend error reporting setting. Your production server shouldn't be wasting ; resources complaining about best practices and coding standards. That's what @@ -462,9 +462,6 @@ memory_limit = 128M ; intentional (e.g., using an uninitialized variable and ; relying on the fact it is automatically initialized to an ; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's ; initial startup @@ -480,11 +477,10 @@ memory_limit = 128M ; Common Values: ; E_ALL (Show all errors, warnings and notices including coding standards.) ; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) ; Default Value: E_ALL ; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT +; Production Value: E_ALL & ~E_DEPRECATED ; https://php.net/error-reporting error_reporting = E_ALL diff --git a/php.ini-production b/php.ini-production index 41f1578a2e7..c62faf52b67 100644 --- a/php.ini-production +++ b/php.ini-production @@ -107,7 +107,7 @@ ; error_reporting ; Default Value: E_ALL ; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT +; Production Value: E_ALL & ~E_DEPRECATED ; log_errors ; Default Value: Off @@ -444,7 +444,7 @@ memory_limit = 128M ; operators. The error level constants are below here for convenience as well as ; some common settings and their meanings. ; By default, PHP is set to take action on all errors, notices and warnings EXCEPT -; those related to E_NOTICE and E_STRICT, which together cover best practices and +; those related to E_NOTICE, which together cover best practices and ; recommended coding standards in PHP. For performance reasons, this is the ; recommend error reporting setting. Your production server shouldn't be wasting ; resources complaining about best practices and coding standards. That's what @@ -464,9 +464,6 @@ memory_limit = 128M ; intentional (e.g., using an uninitialized variable and ; relying on the fact it is automatically initialized to an ; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's ; initial startup @@ -482,13 +479,12 @@ memory_limit = 128M ; Common Values: ; E_ALL (Show all errors, warnings and notices including coding standards.) ; E_ALL & ~E_NOTICE (Show all errors, except for notices) -; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.) ; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) ; Default Value: E_ALL ; Development Value: E_ALL -; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT +; Production Value: E_ALL & ~E_DEPRECATED ; https://php.net/error-reporting -error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT +error_reporting = E_ALL & ~E_DEPRECATED ; This directive controls whether or not and where PHP will output errors, ; notices and warnings too. Error output is very useful during development, but diff --git a/run-tests.php b/run-tests.php index 1c9511130cc..5587c6c0aeb 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1616,7 +1616,6 @@ escape: 'E_USER_ERROR', 'E_USER_WARNING', 'E_USER_NOTICE', - 'E_STRICT', // TODO Cleanup when removed from Zend Engine. 'E_RECOVERABLE_ERROR', 'E_DEPRECATED', 'E_USER_DEPRECATED' diff --git a/sapi/fpm/tests/config-array.phpt b/sapi/fpm/tests/config-array.phpt index 8d97afcac58..4e5ff81da2b 100644 --- a/sapi/fpm/tests/config-array.phpt +++ b/sapi/fpm/tests/config-array.phpt @@ -29,7 +29,7 @@ $tester->start(['-tt']); $tester->expectLogConfigOptions([ 'access.suppress_path[] = /ping', 'access.suppress_path[] = /health_check.php', - 'php_value[error_reporting] = 32767', + 'php_value[error_reporting] = 30719', 'php_value[date.timezone] = Europe/London', 'php_value[display_errors] = 1', 'php_admin_value[disable_functions] = eval', diff --git a/tests/func/bug64523.phpt b/tests/func/bug64523.phpt index d360f097ff4..a44f664e188 100644 --- a/tests/func/bug64523.phpt +++ b/tests/func/bug64523.phpt @@ -7,4 +7,4 @@ error_reporting = E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED echo ini_get('error_reporting'); ?> --EXPECT-- -24565 +22517