Skip to content
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

Controllers shouldn't use getDoctrine #1009

Closed
nicolas-grekas opened this issue Nov 10, 2021 · 0 comments · Fixed by #1010
Closed

Controllers shouldn't use getDoctrine #1009

nicolas-grekas opened this issue Nov 10, 2021 · 0 comments · Fixed by #1010

Comments

@nicolas-grekas
Copy link
Member

Per https://symfony.com/blog/new-in-symfony-5-4-controller-changes, this generates deprecated code:

$ grep getDoctrine  src/ -r
src/Resources/skeleton/crud/controller/Controller.tpl.php:        $<?= $entity_var_plural ?> = $this->getDoctrine()
src/Resources/skeleton/crud/controller/Controller.tpl.php:            $entityManager = $this->getDoctrine()->getManager();
src/Resources/skeleton/crud/controller/Controller.tpl.php:            $this->getDoctrine()->getManager()->flush();
src/Resources/skeleton/crud/controller/Controller.tpl.php:            $entityManager = $this->getDoctrine()->getManager();
src/Resources/skeleton/registration/RegistrationController.tpl.php:            $entityManager = $this->getDoctrine()->getManager();
src/Resources/skeleton/resetPassword/ResetPasswordController.tpl.php:            $this->getDoctrine()->getManager()->flush();
src/Resources/skeleton/resetPassword/ResetPasswordController.tpl.php:        $user = $this->getDoctrine()->getRepository(<?= $user_class_name ?>::class)->findOneBy([
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants