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 autoconfigure for handlers #670
Conversation
good! :) |
{ | ||
$container = $this->getContainerForConfig(array()); | ||
|
||
if (!method_exists($container, 'registerForAutoconfiguration')) { |
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.
In which case the registerForAutoconfiguration
does not exists? Shouldn't this check be done also in JMSSerializerExtension.php
?
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.
It's also done in the extension (line 22)
registerForAutoconfiguration
was added in Symfony 3.3, so it's for <3.3 compatibility.
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.
... and I just saw that symfony-dependency-injection
require is ^3.3
so theses checks can be removed.
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.
The minimum dependency injection is 3.3, so probably this check and also the other you found can be removed... Can you?
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.
Yep
66c33d1
to
7f920a5
Compare
Just saw that there is a branch for 2.x, should I rebase on it? |
The 2.x branch has 2.3 as minimum dep version for the symfony dependency injection, so probably you will have to rework your PR. Here is up to you... the 3.0 should be released in the next 30-50 days (but will require jms/serializer 2.0 and not all the depending libraries are already compatible with it). |
another PR for 2.x, is that fine for you? |
Closing as #671 has been merged. |
@magnetik Thanks for your contribution! |
Such like events we can auto configure handlers.
Also remove checks for
registerForAutoconfiguration
assymfony/dependency-injection
required version is^3.3
.