feat(di): allow container builder to extend an existing container

The ContainerBuilder can now be initialized with an optional punq.Container instance. This enhances flexibility by allowing different parts of an application to progressively register dependencies on a shared container.

If no container is provided, the builder creates a new one, preserving the original behavior. This change makes the ContainerBuilder more suitable for modular architectures where container configuration is distributed.

For example, a core application can set up a base container, and sub-modules can use the builder to add their own services to it without needing a central registration point.

Merge request reports

Loading