Closed
Description
Description
Deprecation of partially supported callables was accepted in RFC and implemented in #7446.
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:
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”.