Closed ghost closed 1 year ago
Good suggestion 👍 , Symfony docs don't mention the ->createView()
anymore either.
I would also include a rule to replace the deprecated AbstractController->renderForm()
with AbstractController->render()
?
Thanks for suggestion, they both sounds good 👍 Go for it :)
I'll exclude this rule, because it hides the fact, that the template will handle a FormView and not a Form. This might be surprising for newcomers and I like to be explicit about my code ;-)
The Symfony documentation suggest implementing it this way. I see no reason for excluding, other than personal preference 🙂
Newcomers should read the documentation to avoid surprises 😬
In Symfony 6.2 a simpler way is introduced to render forms: https://symfony.com/blog/new-in-symfony-6-2-dx-improvements#simpler-form-rendering
I suggest we create a rule that removes the function call
->createView()
what do you think?