> On 3 Jul 2024, at 21:07, Vincent de Lau <[email protected]> wrote:
>
> From: Stephen Reay <[email protected]>
> Sent: Wednesday, July 3, 2024 1:17 PM
>
>> On 1 Jul 2024, at 23:33, Mike Schinkel <mailto:[email protected]> wrote:
>>> Autoloading runs userland code. This means it has the potential conflict between
>>> different packages with different autoloaders
>
>> *Can* run userland code. It doesn't *have to*; FYI spl_autoload
>> (https://www.php.net/manual/en/function.spl-autoload.php) has existed since php5.1 and works
>> amazingly well.
>>
>> That "standards" like psr-whatever can't (read: choose not to) use it says
>> more about people and maintaining their little fiefdoms than anything else.
>
> As a PHP-FIG Core Committee member, I find this characterisation of people involved in the FIG
> offensive. My contribution, however big or small, is intended to help the PHP community at large.
>
If you choose to be offended by my opinion, I can't really help that.
> To come back to spl_autoload: That function pre-dates namespaces and is highly opinionated on
> how to organise code. All lower-case filenames, class per-file, files in include_path, full
> namespace in path, you name it. If that is what projects wanted at the time, or even now, PSR-0 and
> the PHP-FIG would possibly not even exist.
>
It's less highly opinionated than either PSR, but that's my whole point: it's
*someone else's opinion*, hence it's opposed by FIG.
Neither of which is the point I was making - someone claimed that autoloaders are implicitly
userland code. The point is they don't *have* to be, and there is a perfectly useable one built
in to the SPL extension; if it's "too opinionated" (or the opinions are ones you
don't like), it's hardly the most in-depth of functions, and it already *has* configurable
parts, so adding in more control shouldn't exactly require a rocket scientist to add, for
example, the ability to use the original case of the class name.