Add autoconfigure tag for ParamConverterInterface #516
Add autoconfigure tag for ParamConverterInterface #516
Conversation
It's better to do it in the pass anyway as it allows to auto configure any other converter. The |
This makes sense to me: this will create a non-named converter with a priority of 0... which is probably what you want in most cases. @B-Galati could you also update the docs: https://github.com/sensiolabs/SensioFrameworkExtraBundle/blob/74f1f17e1e5c32ca43de92611e9097a8d0e0acf2/Resources/doc/annotations/converters.rst#creating-a-converter. We should say something like "If you're using service auto-registration and autoconfiguration, you're done! Your converter will automatically be used. If not,..." You could even link to http://symfony.com/doc/current/service_container/3.3-di-changes.html for |
678538e
to
ba28726
Compare
@weaverryan It's done thank you, let me know for anything else ;-) |
you're done! Your converter will automatically be used. | ||
If not, you must add a tag to your service: | ||
|
||
.. _auto-registration and autoconfiguration: http://symfony.com/doc/current/service_container/3.3-di-changes.html |
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.
One minor thing, this (by our standard) needs to live all the way at the end of the file :)
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.
done thanks !
ba28726
to
305c918
Compare
Thank you @B-Galati. |
…ati) This PR was merged into the 4.0.x-dev branch. Discussion ---------- Add autoconfigure tag for ParamConverterInterface I tried to add the same behavior in `converters.xml` but it was not working.. ```xml <instanceof id="Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface" public="true"> <tag name="request.param_converter" /> </instanceof> ``` Commits ------- 305c918 Add autoconfigure tag for ParamConverterInterface
I tried to add the same behavior in
converters.xml
but it was not working..