Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-11 Thread Mike Schinkel
> On Jul 11, 2024, at 10:32 AM, Rowan Tommins [IMSoP] > wrote: > > 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 wa

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-11 Thread Rowan Tommins [IMSoP]
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 s

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-11 Thread Mike Schinkel
Preface: I am going to bow out of this conversation now (unless pulled back in) and come back after 8.4 settles. In the mean time I'll be working on two proof-of-concepts. One is a totally userland PoC for packages being able to load same-named symbols, and the other will be working out how t

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-11 Thread Jordi Boggiano
On 2024-07-10 20:08, Michael Morris wrote: On Wed, Jul 10, 2024 at 5:51 AM Jordi Boggiano wrote: As for the rest of the thread, I feel like everyone needs to take a few days to chill because it's getting a bit heated around here. People are passionate about the things they love.  I'

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Jordan LeDoux
On Wed, Jul 10, 2024 at 1:08 PM Michael Morris wrote: > > > I'm in no rush - though it might not seem that way. I don't see this being > able to land before PHP 10. I'm pessimistic about the scope of these > changes. It can be done - and pieces have often been discussed before, but > they peter o

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Rowan Tommins [IMSoP]
On 10 July 2024 21:04:41 BST, Michael Morris wrote: >The largest thrust of modules is to step forward with changes that are >desirable but impossible to implement because of BC breaks brought on by >unfortunate design decisions like the one mentioned previously. Likely >these will be visited o

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Michael Morris
On Wed, Jul 10, 2024 at 3:29 PM Rowan Tommins [IMSoP] wrote: > > > On 10 July 2024 19:08:39 BST, Michael Morris wrote: > > Just to repeat a point that's been raised a few times: this is not a great > time of year for this kind of discussion. If you come back after 8.4 is > baked, you may get mor

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Rowan Tommins [IMSoP]
On 10 July 2024 19:08:39 BST, Michael Morris wrote: Just to repeat a point that's been raised a few times: this is not a great time of year for this kind of discussion. If you come back after 8.4 is baked, you may get more enthusiasm. That will also give you time to make some more detailed

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Michael Morris
On Wed, Jul 10, 2024 at 5:51 AM Jordi Boggiano wrote: > > As for the rest of the thread, I feel like everyone needs to take a few > days to chill because it's getting a bit heated around here. > People are passionate about the things they love. I've been busy with work and on Iteration V. Detai

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Larry Garfield
On Wed, Jul 10, 2024, at 1:38 AM, Mike Schinkel wrote: >> In fact, if you use an optimized/dumped autoloader, then Composer simply >> builds an internal giant lookup table of what class maps to what file. >> PSR-4 is then *completely irrelevant* at runtime. It's already one giant >> O(1) look

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Rowan Tommins [IMSoP]
On Wed, 10 Jul 2024, at 07:38, Mike Schinkel wrote: > The request is to add class maps with a PHP-standardized format into > PHP core so that when a library of code needs to register classes to be > autoloaded they can contribute to a cascading of class maps where ONE > internal function checks

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Mike Schinkel
> On Jul 10, 2024, at 5:50 AM, Jordi Boggiano wrote: > > On 2024-07-09 05:24, Mike Schinkel wrote: >> >> >> And this sentence is why I chose to reply to your message. That assumption >> itself blocks the needs of user-managed apps. >> >> (Did you happen to read my compare-and-contrast of us

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Jordi Boggiano
On 2024-07-09 05:24, Mike Schinkel wrote: And this sentence is why I chose to reply to your message. That assumption itself blocks the needs of user-managed apps. (Did you happen to read my compare-and-contrast of user-managed vs. developer-managed apps from a few days ago?) I feel it is lik

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-10 Thread Mike Schinkel
> On Jul 10, 2024, at 2:56 AM, Jordan LeDoux wrote: > > On Tue, Jul 9, 2024 at 11:42 PM Mike Schinkel > wrote: > [snip] > My one useful takeaway from your email — except that I already knew that — > was the need to figure out how PHP can handle multiple symbol tables

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-09 Thread Jordan LeDoux
On Tue, Jul 9, 2024 at 11:42 PM Mike Schinkel wrote: > [snip] > My one useful takeaway from your email — except that I already knew that — > was the need to figure out how PHP can handle multiple symbol tables. > Beyond that, your take your own advice and spare us (me) from your contempt > and co

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-09 Thread Mike Schinkel
> On Jul 9, 2024, at 1:15 PM, Larry Garfield wrote: > On Sat, Jul 6, 2024, at 1:12 AM, Mike Schinkel wrote: >> WordPress differs from the apps many *(most?)* developers on PHP >> Internals work with in the following way: >> >> WordPress = *User-managed app* >> Most = *Developer-managed apps* >>

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-09 Thread Rob Landers
On Tue, Jul 9, 2024, at 19:15, Larry Garfield wrote: > On Sat, Jul 6, 2024, at 1:12 AM, Mike Schinkel wrote: > > > > > > > Reading this however caused me to ponder things certain people has said > > recently — and many people have said for years on this list — and I > > think I am recognizing s

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-09 Thread Larry Garfield
On Sat, Jul 6, 2024, at 1:12 AM, Mike Schinkel wrote: > > > Reading this however caused me to ponder things certain people has said > recently — and many people have said for years on this list — and I > think I am recognizing something that I have always known but never put > the pieces toget

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-09 Thread Rowan Tommins [IMSoP]
On 9 July 2024 04:24:59 BST, Mike Schinkel wrote: >I think maybe you are replying to an earlier iteration by Michael Morris and >have not seen the more recent iteration? I wrote the message a few days ago, but it didn't post; but the more recent discussion still seems to be focussing on th

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-08 Thread Mike Schinkel
> On Jul 8, 2024, at 5:41 AM, Rowan Tommins [IMSoP] > wrote: > I agree. I wrote most of the below a couple of days ago, but I don't think it > posted correctly, so apologies if some people see it twice: > > Autoloading is just a way to load files later, by the engine telling you when > a clas

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-08 Thread Jordan LeDoux
On Mon, Jul 8, 2024 at 2:42 AM Rowan Tommins [IMSoP] wrote: > > > On 8 July 2024 04:25:45 CEST, Jordan LeDoux > wrote: > >I think it's strange that this discussion has driven deep down the tangent > >of versioning... > [...] > >Things like separating global scope between importer and importee, m

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-08 Thread Rowan Tommins [IMSoP]
On 8 July 2024 04:25:45 CEST, Jordan LeDoux wrote: >I think it's strange that this discussion has driven deep down the tangent >of versioning... [...] >Things like separating global scope between importer and importee, managed >visibility of symbols and exports from modules/packages, allowing f

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-07 Thread Jordan LeDoux
On Wed, Jul 3, 2024 at 5:18 PM Michael Morris wrote: > Hello all. Hitting reset again as the primary problem at hand has become > clear. Let's recap it. > > Autoloading is great for loading packages, but it can't load different > versions of the same package at the same time. Why would you want

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-07 Thread Mike Schinkel
> On Jul 6, 2024, at 8:01 PM, Michael Morris wrote: > > Some context from where I'm coming from. I have been working exclusively in > React, NodeJS and Go up till about a year ago, and in Drupal before that - it > being 10 years since the last time I looked at WordPress. I need work though, >

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-07 Thread Arvids Godjuks
Q On Sun, Jul 7, 2024, 03:03 Michael Morris wrote: > > > >> >> ... >> Many (most?) people on PHP Internals view WordPress coding standards as >> bad and some even view addressing WordPress developers needs as bad for >> PHP >> > > I really don't want to get into that crossfire. WordPress i

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-06 Thread Michael Morris
On Sat, Jul 6, 2024 at 2:12 AM Mike Schinkel wrote: > On Jul 5, 2024, at 1:47 PM, Michael Morris wrote: > I went to sleep thinking about this post, on import maps in general and > how Composer works, specifically when you use a class map instead of the > PSR-0 or PSR-4 schemes. In that mode, Co

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-05 Thread Mike Schinkel
> On Jul 5, 2024, at 1:47 PM, Michael Morris wrote: > I went to sleep thinking about this post, on import maps in general and how > Composer works, specifically when you use a class map instead of the PSR-0 or > PSR-4 schemes. In that mode, Composer does pretty much what I've described. > Thi

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-05 Thread Michael Morris
On Fri, Jul 5, 2024 at 2:23 PM Dusk wrote: > > To that end - consider the following. Let's say that two different files > in your project import different versions of package Foo. Foo contains a > definition of the FooBar class, and contains functions which return that > object. > > 1) If $foobar

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-05 Thread Dusk
On Jul 3, 2024, at 17:16, Michael Morris wrote: > Can PHP support multiple packages without rewriting the whole engine? I > think so, but it isn't trivial, and the side effects need to be cordoned off > so that those who need this complexity can have it while the beginning and > intermediate c

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-05 Thread Michael Morris
On Fri, Jul 5, 2024 at 1:29 AM Mike Schinkel wrote: > On Jul 4, 2024, at 9:16 PM, Michael Morris wrote: > On Wed, Jul 3, 2024 at 11:11 PM Mike Schinkel wrote: > >> So I've had more time to mull this over, and some research, and I think I >> have an approach. > > > First, instead of 'import', us

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-04 Thread Mike Schinkel
> On Jul 4, 2024, at 9:16 PM, Michael Morris wrote: > On Wed, Jul 3, 2024 at 11:11 PM Mike Schinkel > wrote: > So I've had more time to mull this over, and some research, and I think I > have an approach. > > First, instead of 'import', use 'require_module'. The par

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-04 Thread Michael Morris
On Wed, Jul 3, 2024 at 11:11 PM Mike Schinkel wrote: > >> import 'file.php v1.0.0'; > > > > Where will PHP be able to get the version number in a performant manner? > > > > A question for another day. > > Frankly if your proposal hinges on using version numbers to differentiate > then I think i

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-04 Thread Mike Schinkel
> On Jul 4, 2024, at 3:05 PM, Chuck Adams wrote: > >> On Jul 4, 2024, at 12:02 PM, Mike Schinkel wrote: >> >> The point being that PHP is free to choose how they are defined with respect >> to PHP. >> >> To which I will add "as long as the terms are used consistently.” > > ...but whatever

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-04 Thread Chuck Adams
> On Jul 4, 2024, at 12:02 PM, Mike Schinkel wrote: > > Your definitions are language-specific. For example, in Go the definitions > for those terms are the opposite of how you defined them. > > The point being that PHP is free to choose how they are defined with respect > to PHP. > > To w

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-04 Thread Mike Schinkel
Hi Chuck, > On Jul 4, 2024, at 11:05 AM, Chuck Adams wrote: >> On Jul 3, 2024, at 6:16 PM, Michael Morris wrote: >> >> Hello all. Hitting reset again as the primary problem at hand has become >> clear. Let's recap it. >> >> Autoloading is great for loading packages, but it can't load differe

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-04 Thread Chuck Adams
> On Jul 3, 2024, at 6:16 PM, Michael Morris wrote: > > Hello all. Hitting reset again as the primary problem at hand has become > clear. Let's recap it. > > Autoloading is great for loading packages, but it can't load different > versions of the same package at the same time. Why would y

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-03 Thread Mike Schinkel
> On Jul 3, 2024, at 10:31 PM, Michael Morris wrote: > > On Wed, Jul 3, 2024 at 9:56 PM Mike Schinkel wrote: > > There are ~6300 uses of the keyword `import` on GitHub: > > https://github.com/search?q=import+language%3APHP+symbol%3A%2F%5Eimport%24%2F&type=code > > That's a lot of BC breakag

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-03 Thread Michael Morris
On Wed, Jul 3, 2024 at 9:56 PM Mike Schinkel wrote: > > There are ~6300 uses of the keyword `import` on GitHub: > > > https://github.com/search?q=import+language%3APHP+symbol%3A%2F%5Eimport%24%2F&type=code > > > That'

Re: [PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-03 Thread Mike Schinkel
> On Jul 3, 2024, at 8:16 PM, Michael Morris wrote: > Can PHP support multiple packages without rewriting the whole engine? I > think so, but it isn't trivial, and the side effects need to be cordoned off > so that those who need this complexity can have it while the beginning and > intermedia

[PHP-DEV] [PHP-Dev] Versioned Packagers (Iteration IV)

2024-07-03 Thread Michael Morris
Hello all. Hitting reset again as the primary problem at hand has become clear. Let's recap it. Autoloading is great for loading packages, but it can't load different versions of the same package at the same time. Why would you want to do that? When you don't have full control of the code. For