You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if you want to access a service from an action you need to implement the ContainerAwareInterface through this your action receives the complete DI container and can access specific services. This is an anti-pattern since you now use the DI container as service locator. Since our DI container supports now auto-wiring it would be great to support this also for all action/connection and provider implementation. Through this a user could simply create a constructor with the needed dependencies and the DI container resolves them automatically through the type-hint. This would help to develop more clean and testable actions.
The text was updated successfully, but these errors were encountered:
Currently if you want to access a service from an action you need to implement the
ContainerAwareInterface
through this your action receives the complete DI container and can access specific services. This is an anti-pattern since you now use the DI container as service locator. Since our DI container supports now auto-wiring it would be great to support this also for all action/connection and provider implementation. Through this a user could simply create a constructor with the needed dependencies and the DI container resolves them automatically through the type-hint. This would help to develop more clean and testable actions.The text was updated successfully, but these errors were encountered: