Is it possible to decouple the registry of default service providers from Slim\Container?
There may be two options:
a) if $defaultSettings and registerDefaultServices() were not private but protected, I can subclass it and override them to reduce the impact.
b) extract core features to super class as, say, BaseContainer or something like that. It may has every features of Psr\Container\ContainerInterface.
Option a) is easier way, but sealing some feature by overriding sounds bad. Option b) may be the fundamental approach for reuse.
I just sent a pull request for option a). https://github.com/slimphp/Slim/pull/2202
FWiW, v4 will fix this properly by removing core's reliance on a DI container completely.
That sounds good and a little bit of worry. Besides this topic, I am interested on v4 architecture design. Is DI Container optional on v4? Or just removing those reliance? If latter, What is the alternative to supply those information to an app?
v4 will continue to support the DI container, but not need it.
Most helpful comment
FWiW, v4 will fix this properly by removing core's reliance on a DI container completely.