mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
PHP 8.4 - ProxyFactory should skip private(set) properties #7487
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ngirardet-mob on GitHub (Mar 14, 2025).
Bug Report
Summary
The problem appears only since PHP8.4. Maybe this bug will be covered within issue : https://github.com/doctrine/orm/issues/11624
When an entity contains an association, if that association contains private(set) properties, the class
ProxyFactoryshould skip those properties as if they whereprivate.Current behavior
ProxyFactoryconsiders private(set) properties and pass them to thecreateLazyGhostfor initialization and throws an error.Error: Cannot unset private(set) property Doctrine\Tests\ORM\Functional\Ticket\SkipPrivateSetProperties\UserPrivateSetProperties::$company from scope Doctrine\Tests\Proxies\__CG__\Doctrine\Tests\ORM\Functional\Ticket\SkipPrivateSetProperties\UserPrivateSetPropertiesExpected behavior
Private(set) properties should be ignore as if they where
private.How to reproduce
PR on the way