Skip to content

Controllers shouldn't use getDoctrine #1009

Closed
@nicolas-grekas

Description

@nicolas-grekas

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([

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions