-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
FormPass is deprecated in Symfony 3.4 #4700
Comments
Hi all, seems to be no anyone worked on this, can I take this issue? :-) |
Absolutely! Go for it! |
Things to determine :
|
any news @nidble ? |
Is it related to sonata-project/SonataCoreBundle#403? |
Sorry if I am being late! But I had a strong working week. :( I can involve on this issue from monday... |
<service id="sonata.core.form.extension.dependency" class="Sonata\CoreBundle\Form\Extension\DependencyInjectionExtension">
<argument type="service" id="service_container"/>
<argument type="collection"/>
<argument type="collection"/>
<argument type="collection"/>
<argument type="collection"/>
<argument type="collection"/>
<argument type="collection"/>
</service> while symfony core apply a different injection (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml): <service id="form.extension" class="Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension">
<argument /><!-- All services with tag "form.type" are stored in a service locator by FormPass -->
<argument type="collection" /><!-- All services with tag "form.type_extension" are stored here by FormPass -->
<argument type="iterator" /><!-- All services with tag "form.type_guesser" are stored here by FormPass -->
<argument>null</argument><!-- @deprecated argument in 3.3, to be removed in 4.0 -->
</service>
|
@nidble do you understand what the point of this compiler pass is? Because I don't. |
I tried the command on one of my projects, here is what I get:
I think all this should be deprecated. |
Just a side note, @greg0ire: the command which you refer, Maybe, If major version of Symony will be excluded, this layer can be removed. Am I right? :-) |
Yes, but that is a big if. I think your proposal still holds. Can you please make a PR, so that we see a bit more code? |
@greg0ire after further investigate on compile pass process, instead to change service definition I opted to apply small a refactoring to the classes involved in this process. I can make a PR but this will affect on SonataCoreBundle... |
Please make the PR, it will be easier to understand what you are talking about. |
Yep, done! sonata-project/SonataCoreBundle#456 |
Anyone experiencing this, please try the following piece of configuration: sonata_core:
form:
mapping:
enabled: false And use FQCNs wherever you can |
@greg0ire This workaround does not work. Problematic compiler pass is created when the bundle builds the container https://github.com/sonata-project/SonataCoreBundle/blob/3.x/src/SonataCoreBundle.php#L30 but not on config processing. |
Strange. Can you try removing that line, see what happens? |
@ossinkine I just created a PR to fix this. |
@greg0ire |
Maybe should be checking for |
@ossinkine I added another check very very recently, but it does not work perfectly it seems |
Seen while upgrading a Symfony app to 3.4:
The text was updated successfully, but these errors were encountered: