mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Weird conditional skipping of mapping information in attribute/annotations driver #7095
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 @mpdude on GitHub (Jan 17, 2023).
I am looking into an issue where an invalid association definition on a mapped superclass is not rejected as it should be.
It turns out the assocation is not even reported by the mapping driver, due to the following lines of code.
69c7791ba2/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php (L345-L357)This is present in the attribute driver as well. To add insult to injury, the thing I am trying to chase depends on wheter an association is mapped in a
publicorprivateproperty.I have seen this exact piece of code has been questioned in https://github.com/doctrine/orm/issues/5744 before, but neither that nor the reference to #4198 help.
Can anybody help reasoning about this – what's the purpose of these continuations, and what does it have to do with
privatein mapped superclasses?Maybe it has to do with that the Reflection API also reports non-private properties inherited from base classes, but I don't get it.
How do we want to treat such inherited properties, and/or can we tell whether a property was just inherited or inhertied + redeclared?
@mpdude commented on GitHub (Jan 19, 2023):
X-Ref #9702
@mpdude commented on GitHub (Jan 24, 2023):
#10449, #10450 and #10454 show different ways how the conditions from the OP fail.
@mpdude commented on GitHub (Jan 25, 2023):
#10455 tries to fix the mapping driver.
@mpdude commented on GitHub (May 8, 2023):
Closing, since #10455 has been merged and fixes this.