mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #9761] Fix phpdoc and tests for NamingStrategy #11866
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?
Original Pull Request: https://github.com/doctrine/orm/pull/9761
State: closed
Merged: Yes
While working on https://github.com/doctrine/orm/pull/9758, I noticed 2 things that need to be fixed.
When computing a foreign key column name, the referenced column name
may be null in the case of a self referencing entity with join columns
defined in the mapping. I wrongly introduced that phpdoc in #9756.
Also, some tests were using the fact that some arguments of some methods of
the naming strategy interface are optional or nullable for now to avoid
providing some. In practice, these arguments are always provided, and
that should also be the case in tests.
For
propertyToColumnName, I thinkClassMetadataInfo::$nameis always a non-nullable stringSee
45e196eb57/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php (L1635)For
joinTableName()I think related mapping are always defined based on some property and cannot be null either.45e196eb57/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php (L2050)