You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
After upgrading to Symfony 6, an issue has arisen related to the "form.factory" service. This service is no longer public and cannot be retrieved directly from the container. This change is causing an error in the createForm method when I extend from ResourceController, which tries to fetch "form.factory" directly from the container.
Steps to reproduce
Upgrade to Symfony 6.
Use any controller that extends ResourceController and calls the createForm method.
Attempt to load a page that uses the controller.
Possible Solution
Update ResourceController (or ControllerTrait) to use dependency injection for accessing the "form.factory" service, instead of fetching it directly from the container. This change will align the code with Symfony's latest practices and ensure compatibility with Symfony 6.
The text was updated successfully, but these errors were encountered:
Sylius resource bundle version affected: v1.10.2
Description
After upgrading to Symfony 6, an issue has arisen related to the "form.factory" service. This service is no longer public and cannot be retrieved directly from the container. This change is causing an error in the createForm method when I extend from ResourceController, which tries to fetch "form.factory" directly from the container.
ControllerTrait.php
Steps to reproduce
Upgrade to Symfony 6.
Use any controller that extends ResourceController and calls the createForm method.
Attempt to load a page that uses the controller.
Possible Solution
Update ResourceController (or ControllerTrait) to use dependency injection for accessing the "form.factory" service, instead of fetching it directly from the container. This change will align the code with Symfony's latest practices and ensure compatibility with Symfony 6.
The text was updated successfully, but these errors were encountered: