delivery-sdk-php
delivery-sdk-php copied to clipboard
Research&Implement: Use PHP-DI for Dependency Injection
Dependencies like typeMapper
, propertyMapper
, valueConverter
, *Factory
could be injected using DI. If we implemented DI, we could also have a default container and get rid of method such as getModelBinder
.
The goal of this task is to:
- [ ] research whether using a DI framework such as PHP-DI for loading the dependencies in a library such as delivery-sdk-php is a good practice and how it could be implemented properly.
- [ ] either close this issue or implement the DI, based on the findings
Resources:
- http://php-di.org/doc/understanding-di.html
- http://php-di.org/doc/getting-started.html