Re: function autoloading v4 RFC
| From: | Stephen Reay | Date: | Thu, 15 Aug 2024 16:18:44 +0000 |
| Subject: | Re: function autoloading v4 RFC | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124947@lists.php.net to get a copy of this message | ||
> On 15 Aug 2024, at 22:22, Rob Landers <rob@bottled.codes> wrote:
>
> Hello internals,
>
> I've decided to attempt an RFC for function autoloading. After reading hundreds of ancient
> (and recent) emails relating to the topic along with several abandoned RFCs from the past, and after
> much review, I've decided to put forth a variation of a previous RFC, as it seemed the least
> ambitious and the most likely to work:
>
> https://wiki.php.net/rfc/function_autoloading4
>
> Please let me know what you think. An implementation should be along before opening it for a
> vote (now that I realize how important that is).
>
> — Rob
Hi Rob,
I like the simplicity of this, however your RFC doesn't document the changes required to
spl_autoload[1] to allow it to keep working with this new functionality.
The same issue (unexpected additional argument) potentially affects userland autoloaders too, but
obviously the individual authors can fix that themselves (whether this would count as a BC break is
not immediately clear to me)
Slightly tangentially, you may also want to look at a change to spl_autoload_call to
accept a SPL_AUTOLOAD_* argument, so that it works consistently.
Cheers
Stephen
1: https://www.php.net/spl_autoload