-
Notifications
You must be signed in to change notification settings - Fork 232
Open
Description
Hello!
My stack:
php: 8.0.0
symfony: 5.2
doctrine/orm: 2.8.1
doctrine/doctrine-bundle: 2.2.2
I try to request a user by his login through the repository
return new Response(
$this->userRepository->findOneBy(['login' => 'someLogin'])->getLogin()
);
This is due to the fact that the Doctrine annotation parser tries to go through all the properties of the annotation @Orm\Id (see the first screenshot).
And since they don't exist, the foreach loop passes null and I catch this error.
To confirm my words, I attach screenshots from the xdebug:
Doctrine\Common\Annotations\CachedReader::getPropertyAnnotation()
Doctrine\Common\Annotations\CachedReader::getPropertyAnnotations()
Metadata
Metadata
Assignees
Labels
No labels