On Thu, 23 Nov 2023 at 11:48, Stephen Reay <step...@koalephant.com> wrote:

>
> Respectively, I disagree that it's "not a big problem" if your goal is to
> encourage people to use regular functions over classes with static methods.
>


Just to be clear, my answer was specifically addressing your point about
using Composer as an argument for not including things.

I was not saying "... and therefore the argument is true", only "... and
therefore we can discuss the argument without mentioning Composer if we
want to".



> PHP ships with a built in class autoloader function, and pretending that
using 'require_once' everywhere a function is used, is just as easy for the
developer seem disingenuous to be honest.

PHP ships with *the ability to configure* an autoloading function; it will
not load any files without you first telling it where to look. The
workaround being proposed is not to use require_once every time you want a
function, it's to use require_once in the same place you configure your
autoloader.

I totally agree that we can debate whether that workaround is sufficient.
I'm just trying to frame that debate as "autoloading vs require", rather
than a distraction of "Composer vs something else".


Regards,
-- 
Rowan Tommins
[IMSoP]

Reply via email to