Skip to content

Repository type does not match with ManagerRegistry #23

Closed
@soullivaneuh

Description

@soullivaneuh

This PHP code part is valid:

$user = $this->getDoctrine()->getRepository(User::class)->find(
    $this->request->query->get('id')
);

$this->getDoctrine() return a ManagerRegistry instance.

But the final $user does not seems to be typed:

Call to an undefined method object::getUsername().

Using the EntityManagerInterface directly make things working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions