-
Notifications
You must be signed in to change notification settings - Fork 60
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
Move Provider logic in a compilerpass #67
Conversation
912c14d
to
478ba75
Compare
Thanks for this contribution, it definitively sounds like a very good idea. :) Can you correct tests please? |
Done. Thanks @Taluu for the initial PR ;) |
|
||
$id = $providersIds[$provider]; | ||
$definition = $container->getDefinition($id); | ||
$reflection = new \ReflectionClass($definition->getClass()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is broken in case the class is defined with a parameter. You need to resolve the value first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch !
Move Provider logic in a compilerpass
This PR allow users to define their own Providers.
Fixes #66
Sample of use