DDC-830: Missing prefix \ to switch to global space in Tools/EntityGenerator #1026

Closed
opened 2026-01-22 12:59:16 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Oct 7, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user hason:

If generated entity isn't in global namespace and extends class, name of extended class has to have prefix \ to switch to global namespace.

Fix: class Doctrine\ORM\Tools\EntityGenerator

private function _getClassToExtendName()
{
    $refl = new \ReflectionClass($this->_getClassToExtend());

    return '\\' . $refl->getName();
}
Originally created by @doctrinebot on GitHub (Oct 7, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user hason: If generated entity isn't in global namespace and extends class, name of extended class has to have prefix \ to switch to global namespace. Fix: class Doctrine\ORM\Tools\EntityGenerator ``` private function _getClassToExtendName() { $refl = new \ReflectionClass($this->_getClassToExtend()); return '\\' . $refl->getName(); } ```
admin added the Bug label 2026-01-22 12:59:16 +01:00
admin closed this issue 2026-01-22 12:59:16 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 30, 2010):

Comment created by @beberlei:

Fixed.

@doctrinebot commented on GitHub (Oct 30, 2010): Comment created by @beberlei: Fixed.
Author
Owner

@doctrinebot commented on GitHub (Oct 30, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Oct 30, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1026