Re: [RFC] Deprecations for PHP 8.5
| From: | Tim Düsterhus | Date: | Sun, 06 Jul 2025 13:45:04 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.5 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127919@lists.php.net to get a copy of this message | ||
Hi
On 7/3/25 16:45, Ilija Tovilo wrote:
See also my reply to Niels. Such a check already exists: https://github.com/php/php-src/blob/677a1f80c86b7a5848985bf44714210d0b89900b/ext/spl/php_spl.c#L583-L590 That's an explicit special case in the language that could go away. Best regards Tim DüsterhusDeprecate passing spl_autoload_call() to spl_autoload_unregister()Is such a check actually useful? We can prevent spl_autoload_unregister(spl_autoload_call(...)), but we can't prevent spl_autoload_unregister(fn($c) => spl_autoload_call($c)). It seems very unlikely for this to happen accidentally, and excluding all functions that don't make sense to pass is not feasible for obvious reasons. But I don't care too much.