Bad PHPDocBlock AbstractQuery::getSingleScalarResult() #6291

Closed
opened 2026-01-22 15:30:13 +01:00 by admin · 2 comments
Owner

Originally created by @danielspk on GitHub (Sep 4, 2019).

Hi, the DocBlock of the getSingleScalarResult() method of the AbstractQuery class is incomplete.

In addition to NonUniqueResultException it can also return NoResultException.

This causes phpstan to generate an alert about null returns that can never really occur since the expected behavior is an exception of the NoResultException type.

Greetings.

Originally created by @danielspk on GitHub (Sep 4, 2019). Hi, the DocBlock of the getSingleScalarResult() method of the AbstractQuery class is incomplete. In addition to NonUniqueResultException it can also return NoResultException. This causes phpstan to generate an alert about null returns that can never really occur since the expected behavior is an exception of the NoResultException type. Greetings.
admin closed this issue 2026-01-22 15:30:13 +01:00
Author
Owner

@sad270 commented on GitHub (Sep 4, 2019):

It's fixed on master branch :
https://github.com/doctrine/orm/blob/master/lib/Doctrine/ORM/AbstractQuery.php#L781
But it is not release yet.

@sad270 commented on GitHub (Sep 4, 2019): It's fixed on master branch : https://github.com/doctrine/orm/blob/master/lib/Doctrine/ORM/AbstractQuery.php#L781 But it is not release yet.
Author
Owner

@SenseException commented on GitHub (Sep 9, 2019):

@danielspk If is okay for you that is was fixed on master, please close this issue.

@SenseException commented on GitHub (Sep 9, 2019): @danielspk If is okay for you that is was fixed on `master`, please close this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6291