I mean, there are some properties in the ContainerBuilder (for example the containerClass), which can't be overwritten in the configureContainer method. To make it backwards-compatible I would suggest to pass null by default and to let the constructor instantiate the ContainerBuilder if the parameter is null.
Hi, the App class is 5 lines of actual PHP code. If you have more advanced needs like this I encourage you to do this (this is what I do): create your container manually and use the Slim\App class directly.
Hi there
How about injecting the
ContainerBuilder
as a parameter to theApp
constructor?https://github.com/PHP-DI/Slim-Bridge/blob/df3c116bedb325c88c01991605380b0fd77b97ed/src/App.php#L17
I mean, there are some properties in the
ContainerBuilder
(for example thecontainerClass
), which can't be overwritten in theconfigureContainer
method. To make it backwards-compatible I would suggest to passnull
by default and to let the constructor instantiate theContainerBuilder
if the parameter isnull
.