-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBridge] fix BC break caused by using FormRenderer instead of TwigRenderer #26553
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
Conversation
when moving on 4.0, what will these people inject? |
maybe a bit misleading what I wrote. That service So when upgrading to 4.0 its documented here as a BC break: https://github.com/symfony/symfony/blob/master/UPGRADE-4.0.md#twigbridge EDIT: So actually this change here should be dropped completely when merging into 4.0 |
From what I understand, ppl using |
This is not correct for the current 3.4 as the service class was changed to With my change people will indeed see a deprecation notice when using EDIT:
@nicolas-grekas ah you mean with the changes in this PR there is no upgrade path because of the deprecation notice? But this was the same for some other deprecated Symfony service classes or not? Like |
yes, that's what I meant
if yes, we should do stricter reviews, this should not be the case. In the end, shouldn't we live with this BC break and document it in UPGRADE files? |
In the end I'm also fine with just allowing this BC break and documenting it. What do you think @Tobion ? |
If we change it back, all people will get deprecations without upgrade path. So to me it's better document the small bc break. |
See #26570 |
….4 (dmaicher) This PR was merged into the 3.4 branch. Discussion ---------- [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? |no | Tests pass? | yes | Fixed tickets | #24616, #25659 | License | MIT | Doc PR | - This is a follow up for #26553 as it seems impossible to fix the BC break in a clean way for everyone. ping @nicolas-grekas @Tobion Commits ------- 47a3d7a [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
In 6ea71cb#diff-5eb0532c96734f6e23428e921225b2f0R21 the
TwigRenderer
service was replaced withFormRenderer
.This caused 2 BC breaks:
twig.form.renderer
and coding against the interfaceTwigRendererInterface
suddenly received an error because the newFormRenderer
does not implement this interface.Twig_Error_Runtime
exceptionThis PR reverts the class change for the service
twig.form.renderer
. This should be safe to revert because the oldTwigRendererInterface
extendsFormRendererInterface
andTwigRenderer
extendsFormRenderer
. So all people that adapted to the BC break and changed the expected interface/class should still be fine.Additionally because some people already adjusted to the second BC break when retrieving the runtime (see for example sonata-project/SonataAdminBundle#4758) we add the new non-deprecated
FormRenderer
as a runtime as well.So both of these work on 3.4 then:
WDYT? Did I forget something?