New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduced the DI container #6555
Conversation
…. DI in controllers)
…lers, makes sense since controllers are not services
Feedback:
Excellent to see we're getting started on DI! |
Regarding the number of dependencies, I had planned to make ocramius/proxy-manager optional in v5.0. I've created an issue for this: PHP-DI/PHP-DI#198 I've made the change and created a new For those interested in following v5.0 here is the branch: PHP-DI/PHP-DI#200 |
Conflicts: composer.json composer.lock
This reverts commit 3668fde.
@mattab this PR can be merged to be released in a beta. The container is used to create all controllers, i.e. That simple change will let us test that everything works correctly for users. |
Excellent! now let's see if beta testers notice any problem or error 👍 |
@diosmosis the day has come that PHP-DI is included in Piwik! REJOICE! |
I've added the DI container. I've kept things simple for now to have a readable diff.
config/global.php
config file, alongside the existing config filesPiwik\StaticContainer
, which returns a singleton of the container: this is deprecated already but necessary so that the container can be used in singletons to migrate to DIFrontController
now uses the container to create controllersThat means that we have DI in controllers.