Re: [RFC] New core autoloading mechanism with support for function autoloading
| From: | Hans Krentel via internals | Date: | Tue, 11 Apr 2023 17:12:35 +0000 |
| Subject: | Re: [RFC] New core autoloading mechanism with support for function autoloading | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-119936@lists.php.net to get a copy of this message | ||
On Monday 10 April 2023 14:17:04 (+02:00), G. P. B. wrote:
Hello Internals, Dan and I would like to propose a new core autoloading mechanism [...] The existing SPL autoloading functions would become aliases to the new Core
ones and will continue to work without any migrations needing to be performed. Hope to hear your opinions about this!Thanks for taking the time for this, I only quickly skimmed over it, an insightful reading already. What I wondered about and which made me writing a reply on the list is in retrospect of the times class autoloading came in, which is also closer to the time when namespaces were introduced. It was the latter which brought us
class_alias() [0] and I've used it often in code migrations (is 8.3 the new 5.3? would be easy to remember.).
So I'd love to see some commentary on a function_alias() if now function autoloading is considered to come in, as I can imagine this has similar effects for how you'd like to namespace PHP code with the new, better functionality of function autoloading and access to an alias table from PHP "userspace" I'd consider helpful then.
Best,
-- hakre
[0]: https://www.php.net/class_alias