mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #981] [CLOSED] Throw exception for invalid mappedBys rather than PHP undefined index warning #8992
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?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/981
Author: @rodmcnew
Created: 3/17/2014
Status: ❌ Closed
Base:
master← Head:throw-exception-for-invalid-mappedBy📝 Commits (1)
01227b9This fix throws an appropriate MappingException with an explanation of what is wrong with the mapping rather than just throwing an un-actionable php warning.📊 Changes
1 file changed (+8 additions, -0 deletions)
View changed files
📝
lib/Doctrine/ORM/Persisters/BasicEntityPersister.php(+8 -0)📄 Description
This fix throws an appropriate MappingException with an explanation of what is wrong with the mapping rather than just throwing an un-actionable php warning.
Example old error message: "Undefined index: item in /www/apps/rwriter/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php on line 2079”
Example new MappingException message: “Property items in RcmShoppingCart\Entity\TempOrder specified mappedBy="tempOrderItem" but tempOrderItem is not a property of RcmShoppingCart\Entity\TempOrderItem”
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.