mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1743: [GH-315] [WIP] Allowing proxies to be passed to ORM public API #2190
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 (Mar 31, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user @beberlei:
This issue is created automatically through a Github pull request on behalf of Ocramius:
Url: https://github.com/doctrine/doctrine2/pull/315
Message:
Basically, following happens:
Fortunately, just some replacements of
get_class($entity)withDoctrine\Common\Util\ClassUtils::getClass($entity)fix the issue.I wanted to leave this as [WIP] because I need some feedback on the test cases. All three tests fail without the patch, while
with it applied.
What is a bit tricky is the status of the proxies.
Cases where
$*_initialized__ = false;&&$*identifier = array();and others fail because of notices and weird issues that are very difficult to hunt down. That is because of the strange nature of proxies obviously. I just wanted to know if this should be somehow fixed in here.Another issue is probably performance, as there is some minor overhead introduced. What I'd like to know is if https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Util/ClassUtils.php#L56 could be reduced to a
if ($object instanceof Proxy) { ... }.