On Sun, Jun 28, 2026 at 6:13 PM Rowan Tommins [IMSoP] <[email protected]>
wrote:

> On 28 June 2026 15:25:53 BST, "Alex Pătrănescu" <[email protected]>
> wrote:
> >The name is still open, but I am not sure about using "container" as the
> >final name.
> >To me, it does not fully match the design I have in mind: a graph of
> >symbol-owning packages/modules where code running in one module can only
> >see its own symbols and the symbols from its declared dependencies.
> >
> > ...
> >
> >As I mentioned, these runtime modules could map naturally over Composer
> >packages and their required dependencies.
>
>
> OK, then I don't know what problem you're trying to solve. It sounds like
> a lot of disruption to a package ecosystem which already works perfectly
> well.
>


I agree that it's important to clearly state the problem as well. Allow
multiple versions of the same package to be installed and used
simultaneously, avoiding the current inevitable conflicts.
The problem is maybe not common with small projects, and it's encountered
more in the enterprise projects that grow big and with many dependencies
and makes library upgrades a difficult task.


>
> The WordPress use case does not need to declare a hierarchy of modules; it
> needs to create a single boundary around an arbitrary set of code, which
> might or might not happen to be a fully-populated vendor directory.
>

Agreed, so it seems that WordPress case is easily coverable with something
like this, without a complex hierarchy of modules:

```
$wp = 'wordpress/core';
$pluginA = 'wordpress/plugin/plugin-a';
$pluginB = 'wordpress/plugin/plugin-b';

module_run($pluginA, function () use ($wp): void {
    module_add_dependency($wp);
});
module_run($pluginB, function () use ($wp): void {
    module_add_dependency($wp);
});

module_run($wp, function (): void {
    require ABSPATH . 'wp-includes/runtime-module-core-bootstrap.php';
});

module_run($pluginA, function (): void {
    require WP_PLUGIN_DIR . '/plugin-a/vendor/autoload.php'; // Includes
Guzzle 6.
    require WP_PLUGIN_DIR . '/plugin-a/plugin.php';
});

module_run($pluginB, function (): void {
    require WP_PLUGIN_DIR . '/plugin-b/vendor/autoload.php'; // Includes
Guzzle 7.
    require WP_PLUGIN_DIR . '/plugin-b/plugin.php';
});
```



-- 
Alex

Reply via email to