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
The screenshot in the example here currently suggests that a form type service is being automatically created for every custom resource.
This is not true, but I think everyone would benefit if it actually were true. Sylius Standard automatically disables autowiring for all form types which extend AbstractResourceType. This means that we aren't getting any errors about Symfony's inability to autowire the constructor of AbstractResourceType, but whenever a form like that is actually used, the error still pops up, asking you to wire these two arguments manually.
It would be nice if the ResourceBundle's DI took care to wire these two arguments (class name and validation groups) for all forms which extend AbstractResourceType. This would allow us to avoid hardcoding the actual class name in the forms and would nicely complement the way other services (Controller, Factory, Manager, Repository) are created.
The text was updated successfully, but these errors were encountered:
rimas-kudelis
changed the title
Automatically create and wire form services when possible
Automatically create and wire form type services when possible
Feb 9, 2022
The screenshot in the example here currently suggests that a form type service is being automatically created for every custom resource.
This is not true, but I think everyone would benefit if it actually were true. Sylius Standard automatically disables autowiring for all form types which extend AbstractResourceType. This means that we aren't getting any errors about Symfony's inability to autowire the constructor of AbstractResourceType, but whenever a form like that is actually used, the error still pops up, asking you to wire these two arguments manually.
It would be nice if the ResourceBundle's DI took care to wire these two arguments (class name and validation groups) for all forms which extend AbstractResourceType. This would allow us to avoid hardcoding the actual class name in the forms and would nicely complement the way other services (Controller, Factory, Manager, Repository) are created.
The text was updated successfully, but these errors were encountered: