[PR #1213] fix instantiation of embedded object in ReflectionEmbeddedProperty #9271

Closed
opened 2026-01-22 16:03:47 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1213

State: closed
Merged: No


Recently, ReflectionEmbeddedProperty was updated to extend ReflectionProperty. This broke any embeddable that extends an abstract class. That's because if a property is defined in the abstract class, $this->class is alway the abstract class and thus cannot be instantiated. The $class parameter that is passed into the constructor needs to be stored, and that class should be instantiated, not the the property's declaring class.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1213 **State:** closed **Merged:** No --- Recently, ReflectionEmbeddedProperty was updated to extend ReflectionProperty. This broke any embeddable that extends an abstract class. That's because if a property is defined in the abstract class, <code>$this->class</code> is alway the abstract class and thus cannot be instantiated. The <code>$class</code> parameter that is passed into the constructor needs to be stored, and that class should be instantiated, not the the property's declaring class.
admin added the pull-request label 2026-01-22 16:03:47 +01:00
admin closed this issue 2026-01-22 16:03:48 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9271