php-src/ext/spl
Rowan Tommins af15923bc3
Extend deprecation notices to is_callable($foo) and callable $foo
Implements https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices
so that uses of "self" and "parent" in is_callable() and callable
type constraints now raise a deprecation notice, independent of the
one raised when and if the callable is actually invoked.

A new flag is added to the existing check_flags parameter of
zend_is_callable / zend_is_callable_ex, for use in internal calls
that would otherwise repeat the notice multiple times. In particular,
arguments to internal function calls are checked first based on
arginfo, and then again during ZPP, so the former suppresses the
deprecation notice.

Some existing tests which raised this deprecation have been updated
to avoid the syntax, but the existing version retained for maximum
regression coverage until it is made an error.

With thanks to Juliette Reinders Folmer for the RFC and initial
investigation.

Closes GH-8823.
2022-07-14 17:07:42 +02:00
..
tests Merge branch 'PHP-8.1' 2022-07-05 21:45:13 +01:00
config.m4 Refactor SplFixedArray (#7168) 2021-06-18 15:22:52 +01:00
config.w32 Refactor SplFixedArray (#7168) 2021-06-18 15:22:52 +01:00
CREDITS
php_spl_arginfo.h Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416) 2021-08-30 13:50:34 +02:00
php_spl.c Extend deprecation notices to is_callable($foo) and callable $foo 2022-07-14 17:07:42 +02:00
php_spl.h Use ZEND_TLS for spl (#7043) 2021-05-26 09:36:23 +02:00
php_spl.stub.php Add support for generating MAY_BE_ARRAY_OF_REF func info flag (#7416) 2021-08-30 13:50:34 +02:00
spl_array_arginfo.h Narrow ArrayIterator::key() return type 2021-07-15 11:03:50 +02:00
spl_array.c Reduce memory allocated by var_export, json_encode, serialize, and other (#8902) 2022-07-08 14:47:46 +02:00
spl_array.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_array.stub.php Narrow ArrayIterator::key() return type 2021-07-15 11:03:50 +02:00
spl_directory_arginfo.h Update gen_stub to support #if around classes 2022-06-13 16:34:12 -04:00
spl_directory.c Make php_fgetcsv() return a HashTale instead of in-out zval param (#8936) 2022-07-08 12:11:05 +01:00
spl_directory.h Refactor spl_filesystem_object_get_path() to return zend_string* 2022-06-23 14:41:24 +01:00
spl_directory.stub.php Remove internal usage of SplFileInfo::_bad_state_ex() method (#8318) 2022-06-09 13:24:58 +01:00
spl_dllist_arginfo.h Declare tentative return types for ext/spl - part 2 2021-07-14 15:19:51 +02:00
spl_dllist.c Reduce memory allocated by var_export, json_encode, serialize, and other (#8902) 2022-07-08 14:47:46 +02:00
spl_dllist.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_dllist.stub.php Declare tentative return types for ext/spl - part 2 2021-07-14 15:19:51 +02:00
spl_engine.h Refactor SplFixedArray (#7168) 2021-06-18 15:22:52 +01:00
spl_exceptions_arginfo.h Generate ext/spl class entries from stubs 2021-02-18 13:01:51 +01:00
spl_exceptions.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_exceptions.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_exceptions.stub.php Generate ext/spl class entries from stubs 2021-02-18 13:01:51 +01:00
spl_fixedarray_arginfo.h Declare tentative return types for ext/spl - part 2 2021-07-14 15:19:51 +02:00
spl_fixedarray.c Convert return type of various object handlers from int to zend_result (#8755) 2022-06-26 01:00:19 +02:00
spl_fixedarray.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_fixedarray.stub.php Declare tentative return types for ext/spl - part 2 2021-07-14 15:19:51 +02:00
spl_functions.c SPL: minor refactoring (#8341) 2022-04-13 20:34:23 +01:00
spl_functions.h SPL: minor refactoring (#8341) 2022-04-13 20:34:23 +01:00
spl_heap_arginfo.h Declare tentative return types for ext/spl - part 2 2021-07-14 15:19:51 +02:00
spl_heap.c Use safe_*erealloc* flavor in few places to mitigate possible overflows. 2022-07-04 14:41:04 +01:00
spl_heap.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_heap.stub.php Declare tentative return types for ext/spl - part 2 2021-07-14 15:19:51 +02:00
spl_iterators_arginfo.h Use more specific return types in SPL 2022-04-11 14:04:37 +01:00
spl_iterators.c Merge branch 'PHP-8.1' 2022-05-03 12:59:59 +02:00
spl_iterators.h Stop including php_pcre.h from spl_iterators.h 2022-04-08 10:37:12 +02:00
spl_iterators.stub.php Use more specific return types in SPL 2022-04-11 14:04:37 +01:00
spl_observer_arginfo.h Remove bogus type of $object param in SplObjectStorage::offsetSet() 2021-12-28 18:01:26 +01:00
spl_observer.c Reduce memory allocated by var_export, json_encode, serialize, and other (#8902) 2022-07-08 14:47:46 +02:00
spl_observer.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
spl_observer.stub.php Remove bogus type of $object param in SplObjectStorage::offsetSet() 2021-12-28 18:01:26 +01:00