Open
Description
Bug Report
Q | A |
---|---|
Version | 3.4.0 |
PHP version | <8.4.0 |
Summary
For embeddables that have superclasses, the hydrator cannot set readonly properties that are inherited from a superclass (for PHP <8.4).
Current behavior
Inherited readonly properties cannot be set and an exception is thrown: Error: Cannot initialize readonly property <super-class>::$<prop-name> from scope <derived-class>
. The entity hydration is terminated.
The problem is introduced in 3.4.0 with new property accessors. The previous reflection property-based code still works, but it is not used in the hydration code anymore.
Expected behavior
The hydration is successful.
How to reproduce
Just use an embeddable with a superclass that has a readonly ORM column.
Metadata
Metadata
Assignees
Labels
No labels