mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-940: Entities can / can not have private properties #1171
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 @doctrinebot on GitHub (Dec 15, 2010).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user tech13:
In the note in
http://www.doctrine-project.org/docs/orm/2.0/en/reference/working-with-objects.html#merging-entities
It appears to state that private variables are not serialized for child objects
If this is the only reason entities can't have private properties, then this restriction is no longer valid, or possibly be reconsidered.
The output suggests private variables are serialized, and are restored fine
@stloyd commented on GitHub (Dec 8, 2015):
This totally correct behavior of PHP language.
privatevariable are not visible for class that extend parent, if you want to see them you need to mark them asprotected.@Ocramius commented on GitHub (Dec 9, 2015):
Indeed: https://3v4l.org/Ha3qj
Also, this was already fixed (we deal with merging private state, AFAIK).
Closing, unless somebody comes up with a failing test case.