Gina Peter Banyard 2024-08-12 16:10:30 +01:00 committed by GitHub
parent c818d944cf
commit 0a23b0678d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 0 deletions

1
NEWS
View file

@ -11,6 +11,7 @@ PHP NEWS
. Fixed bug GH-15181 (Disabled output handler is flushed again). (cmb) . Fixed bug GH-15181 (Disabled output handler is flushed again). (cmb)
. Passing E_USER_ERROR to trigger_error() is now deprecated. (Girgias) . Passing E_USER_ERROR to trigger_error() is now deprecated. (Girgias)
. Fixed bug GH-15292 (Dynamic AVX detection is broken for MSVC). (nielsdos) . Fixed bug GH-15292 (Dynamic AVX detection is broken for MSVC). (nielsdos)
. Using "_" as a class name is now deprecated. (Girgias)
- Curl: - Curl:
. Added constants CURL_HTTP_VERSION_3 (libcurl 7.66) and CURL_HTTP_VERSION_3ONLY . Added constants CURL_HTTP_VERSION_3 (libcurl 7.66) and CURL_HTTP_VERSION_3ONLY

View file

@ -410,6 +410,8 @@ PHP 8.4 UPGRADE NOTES
RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types RFC: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
. Passing E_USER_ERROR to trigger_error() is now deprecated. . Passing E_USER_ERROR to trigger_error() is now deprecated.
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
. Using "_" as a class name is now deprecated.
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_using_a_single_underscore_as_a_class_name
- Curl: - Curl:
. The CURLOPT_BINARYTRANSFER constant is deprecated. . The CURLOPT_BINARYTRANSFER constant is deprecated.

View file

@ -0,0 +1,18 @@
--TEST--
Using "_" as a class name is deprecated
--FILE--
<?php
namespace Foo\Bar {
class _ {}
}
namespace {
class _ {}
}
?>
--EXPECTF--
Deprecated: Using "_" as a class name is deprecated since 8.4 in %s on line %d
Deprecated: Using "_" as a class name is deprecated since 8.4 in %s on line %d

View file

@ -243,6 +243,9 @@ void zend_assert_valid_class_name(const zend_string *name) /* {{{ */
zend_error_noreturn(E_COMPILE_ERROR, zend_error_noreturn(E_COMPILE_ERROR,
"Cannot use '%s' as class name as it is reserved", ZSTR_VAL(name)); "Cannot use '%s' as class name as it is reserved", ZSTR_VAL(name));
} }
if (zend_string_equals_literal(name, "_")) {
zend_error(E_DEPRECATED, "Using \"_\" as a class name is deprecated since 8.4");
}
} }
/* }}} */ /* }}} */