-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace proxy layer with ProxyManager's layer #6719
Replace proxy layer with ProxyManager's layer #6719
Conversation
…ted during proxy initialization
…parser should not manually do `class_exists` checks unless strictly required
…ations are set there
…have notify property listeners to function correctly
…eplaced with `GhostObjectInterface` checks
… a proxy should NOT modify its state, but just make it non-managed
…round `__clone` and `__wakeup` semantics
…xy data after detach operations
…eed fetch the class even if prefixed
…ching associated identifiers (which are already available)
…nto a deep identifier
…t while cloning, but they are not considered managed
…o overwrite the entity data, in which case the `UnitOfWork` is indeed tracking entity state
…GenerateProxyClasses` methods
…Metadata` instance Ref: doctrine#6719 (comment)
🚢 |
…Metadata` instance Ref: #6719 (comment)
…Metadata` instance Ref: doctrine#6719 (comment)
…Metadata` instance Ref: doctrine#6719 (comment)
Done a quick scan of the diff and this seems to be a massive BC break (literally spelled out in upgrading.md); should it not be targetting 3.0.x not 2.10.x ? |
I'm AFK for a week and I don't remember what the plan was here. @beberlei, can you please advise? |
This should really land in 3.x, as the type of the proxies changes completely. |
Its not really a madsive BC break as the Proxy interface is mostly internal. The idea is, when possible and i think that might be, a user should be able to decide which proxy generator to use via config, which would allow downstreams to gradually prepare for 3.0. That would require proxy manager to be flexible enough to also implement our Proxy interface if possible. Otherwise we can provide APIs that would enable forward compatibility |
Replaces #1241
TODOs:
ProxyManager
class names are properly recognizedClassUtils
shimProxy*
related code in ORMDoctrine\ORM\Configuration
to work withProxyManager
utilitiesClassUtils
to work withProxyManager
proxy class namesIdentifierFlattener
EntityManager#getReference()
callsProxyFactory#getProxy()
with un-touched data__sleep
behavior changes__wakeup
behavior changesserialize()
no longer breaks the graph -> potentially dangerous if serializing over large association graphsProxy
interface goneprivate
property access now triggers lazy-loadingReflectionProperty
property access now triggers lazy-loadingprivate
property access now triggers lazy-loadingReflectionProperty
property access now triggers lazy-loading