-
Notifications
You must be signed in to change notification settings - Fork 138
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
add DI container support #327
add DI container support #327
Conversation
Codecov Report
@@ Coverage Diff @@
## master #327 +/- ##
============================================
- Coverage 57.74% 57.57% -0.18%
- Complexity 658 665 +7
============================================
Files 35 36 +1
Lines 2123 2138 +15
============================================
+ Hits 1226 1231 +5
- Misses 897 907 +10
Continue to review full report at Codecov.
|
Co-authored-by: Mark Scherer <dereuromark@users.noreply.github.com>
Sounds pretty BC safe to me now. |
Should I ignore that phpcs error regarding |
Can you maybe add some docs for it too? |
Fixes #324
This implementation allows the user to get access to the DI container instance via adding
to the desired task.
I first thought to implement the same behaviour as it is present in the controller where the
services()
method automatically detects the desired services via the argument types but i think it is easier to just pass the DI container instance to the task and the user can retrieve as many services as he wants from that instance.The only thing I am not really sure if its the "correct" way is the fact how I inject the container instance into the processor (and therefore into the task) - see bellow my github code comment.