[php-src] Issue #8401: is_callable($deprecated_callable), etc., should throw a deprecation notice

From: Date: Tue, 19 Apr 2022 15:20:12 +0000
Subject: [php-src] Issue #8401: is_callable($deprecated_callable), etc., should throw a deprecation notice
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241078@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8401 Author: claudepache ### Description Deprecation of partially supported callables where accepted in [RFC] and implemented in #7446. [RFC]: https://wiki.php.net/rfc/deprecate_partially_supported_callables The callable type and the is_callable() function were wilfully exempted from the deprecation notice. While I can guess some of the reasoning behind this decision, real world code shows that this is problematic, and a bunch of code would silently break in 9.0. See the links in https://externals.io/message/117342#117374 for some examples. As additional example, I have found few instances of the following pattern in my own code base: ```php if (is_callable([ 'self', 'some_prefix_'.$foo ]) { self::{'some_prefix_'.$foo}(...$args); } ``` Request: The callable type, the is_callable() function (and any other function that currently supports partially supported callables) should throw a deprecation notice whenever they encounter a “deprecated callable”.

« previous php.bugs (#241078) next »