-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata #22481
Conversation
f060cd5
to
993ce0a
Compare
993ce0a
to
c97b08e
Compare
your proposal looks weird. Your PR on SonataCoreBundle would still alter the definition of |
About "private", that's the reason why the pass now calls |
Still 👍 here |
Thank you @nicolas-grekas. |
…to help BC with Sonata (nicolas-grekas) This PR was merged into the 3.3-dev branch. Discussion ---------- [FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - I tried updating a Sonata project to 3.3, and found it broken. The issue is that Sonata uses the constructor arguments of the `form.extension` to create its own `form.extension` service - but borrows its first args from the Symfony one. Here is the form pass doing that: https://github.com/sonata-project/SonataCoreBundle/blob/3.x/DependencyInjection/Compiler/FormFactoryCompilerPass.php And the implementation of the form extension: https://github.com/sonata-project/SonataCoreBundle/blob/3.x/DependencyInjection/SonataCoreExtension.php Question: is this covered by the BC policy? It shouldn't to me, because that would prevent *any* service reconfiguration. Thus, I'm proposing the attached patch, which basically reverts the deprecated `FormPass` in FrameworkBundle to its 3.2 state. I added a check to the new `FormPass` in the Form component so that it doesn't overwrite such compatibility configurations. See for corresponding fix on sonata-project/SonataCoreBundle#399 Commits ------- c97b08e [FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata
I tried updating a Sonata project to 3.3, and found it broken.
The issue is that Sonata uses the constructor arguments of the
form.extension
to create its ownform.extension
service - but borrows its first args from the Symfony one.Here is the form pass doing that:
https://github.com/sonata-project/SonataCoreBundle/blob/3.x/DependencyInjection/Compiler/FormFactoryCompilerPass.php
And the implementation of the form extension:
https://github.com/sonata-project/SonataCoreBundle/blob/3.x/DependencyInjection/SonataCoreExtension.php
Question: is this covered by the BC policy? It shouldn't to me, because that would prevent any service reconfiguration.
Thus, I'm proposing the attached patch, which basically reverts the deprecated
FormPass
in FrameworkBundle to its 3.2 state.I added a check to the new
FormPass
in the Form component so that it doesn't overwrite such compatibility configurations.See for corresponding fix on sonata-project/SonataCoreBundle#399