Re: Iteration III: Packages (was Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript)

From: Date: Wed, 03 Jul 2024 17:15:43 +0000
Subject: Re: Iteration III: Packages (was Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript)
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Wed, Jul 3, 2024 at 12:52 PM Matthew Weier O'Phinney <
[email protected]> wrote:

>
>
> I'm following the packaging threads closely, and the one thing I've failed
> to see a solid argument for is _what problems_ the current approach of
> using namespaced code doesn't address.
>

Running multiple versions of the same code.  Say you're writing an
extension for Drupal and you want to use a nifty new feature of the newly
released Twig 4.  Under the current system you're outta luck until the
Drupal project moves to 4, and that might take awhile, ESPECIALLY if 4 has
BC breaks.

You can monkey type the twig files with something like
the brianhenryie/strauss package for WordPress, programmatically changing
the namespace declaration of every file in the package to something of your
choosing, but that feels a bit hackish at best.


Thread (128 messages)

« previous php.internals (#124203) next »