On Thu, 11 Jul 2024, at 12:26, Mike Schinkel wrote:
> Let me use an analogy.  Envision two people on a city council of a small 
> town.  One proposes the city should
> implement a water, power and sewer grid so anyone who wants to build a new 
> home or business in the city 
> would be able to do so easily. 

This is a terrible analogy, IMHO. Here's a more pertinent one:

You have a city, where there is a working electricity grid. [That's 
autoloading, provided by PHP for many years.]

Most of the city are using a particular plug and socket system; the sockets 
aren't fitted by the electricity company, but the shops are full of devices 
that use these plugs, and most people have found the sockets really easy to 
fit. [That's Composer]

One district runs most of its appliances on gas, and has its own way of 
connecting them. People want to run electric appliances, and the grid goes 
right through the district, but for some reason, nobody's connected it up to 
the houses. So everyone has multiple gas-to-electricity converters, which is 
annoying. [That's WordPress]

Someone comes along, and rather than approaching the district [WordPress] and 
offering to help wire them to the existing grid, decides that what's needed is 
for the city to provide them with a new type of plug [a different autoloader 
function], which they won't be able to use immediately anyway.


> https://en.wikipedia.org/wiki/Interoperability
> https://en.wikipedia.org/wiki/Network_effect 

Adding something to core in the hope of it becoming a standard is exactly the 
opposite of the network effect. The network effect is "everyone already uses 
Composer, so nobody cares what PHP core does".

See also https://xkcd.com/927/ and since I used an electric plug analogy, check 
out the "international standard" plug, which has been adopted in exactly one 
country: https://en.wikipedia.org/wiki/IEC_60906-1


If you want to solve autoloading in WordPress, this is the wrong forum. 

Firstly, anything you do in core will not be adopted by WordPress, because it 
will be 5+ years before their minimum PHP version is high enough to use it. 
You're going to have to write a userland polyfill anyway.

Secondly, mapping namespaces to directories isn't the hard part for WordPress. 
The hard part is integrating into their existing plugin installer system - 
which already has a system for metadata, it doesn't need a new config file - 
and persuading plugin authors to actually use it.

Maybe you also need Composer to make some changes to control it without the 
CLI, so plugins can list their requirements and have them installed centrally. 
That's also not a subject for this list.

Regards,
-- 
Rowan Tommins
[IMSoP]

Reply via email to