DDC-362: Missing namespace declaration in __call function of EntityRepository.php #450

Closed
opened 2026-01-22 12:38:45 +01:00 by admin · 6 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 22, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user m.walter:

Line 167 of Doctrine\ORM\EntityRepository:

throw DoctrineException::findByNameRequired();

Should be:
throw \Doctrine\Common\DoctrineException::findByNameRequired();

Otherwise I get class not found exceptions, since DoctrineException is not part of the Doctrine\ORM namespace.

Originally created by @doctrinebot on GitHub (Feb 22, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user m.walter: Line 167 of Doctrine\ORM\EntityRepository: throw DoctrineException::findByNameRequired(); Should be: throw \Doctrine\Common\DoctrineException::findByNameRequired(); Otherwise I get class not found exceptions, since DoctrineException is not part of the Doctrine\ORM namespace.
admin added the Bug label 2026-01-22 12:38:45 +01:00
admin closed this issue 2026-01-22 12:38:46 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 22, 2010):

Comment created by romanb:

Right, that should be replaced with an ORMException. Thanks for catching this.

@doctrinebot commented on GitHub (Feb 22, 2010): Comment created by romanb: Right, that should be replaced with an ORMException. Thanks for catching this.
Author
Owner

@doctrinebot commented on GitHub (Feb 23, 2010):

Comment created by shurakai:

I've attached a fix for this which also contains a UnitTest case.

@doctrinebot commented on GitHub (Feb 23, 2010): Comment created by shurakai: I've attached a fix for this which also contains a UnitTest case.
Author
Owner

@doctrinebot commented on GitHub (Feb 23, 2010):

Comment created by shurakai:

I've added another file, which contains the first file but also removes the other DoctrineException call and adds another unit test.

@doctrinebot commented on GitHub (Feb 23, 2010): Comment created by shurakai: I've added another file, which contains the first file but also removes the other DoctrineException call and adds another unit test.
Author
Owner

@doctrinebot commented on GitHub (Feb 23, 2010):

Comment created by @guilhermeblanco:

In r7208 this issue was fixed.

@doctrinebot commented on GitHub (Feb 23, 2010): Comment created by @guilhermeblanco: In r7208 this issue was fixed.
Author
Owner

@doctrinebot commented on GitHub (Feb 23, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Feb 23, 2010): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 2 attachments from Jira into https://gist.github.com/ac4a37ba3c4266361fb4

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 2 attachments from Jira into https://gist.github.com/ac4a37ba3c4266361fb4 - [10387_fix_entityrepository_ormexception.patch](https://gist.github.com/ac4a37ba3c4266361fb4#file-10387_fix_entityrepository_ormexception-patch) - [10388_fix_entityrepository_ormexception.patch](https://gist.github.com/ac4a37ba3c4266361fb4#file-10388_fix_entityrepository_ormexception-patch)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#450