delivery-sdk-php icon indicating copy to clipboard operation
delivery-sdk-php copied to clipboard

Research&Implement: Use PHP-DI for Dependency Injection

Open petrsvihlik opened this issue 7 years ago • 0 comments

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

petrsvihlik avatar Jan 05 '18 16:01 petrsvihlik