DDC-3481: [GH-1241] [3.0] [POC] lazy-load on a per-property base #4291

Closed
opened 2026-01-22 14:38:58 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 9, 2015).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of Ocramius:

Url: https://github.com/doctrine/doctrine2/pull/1241

Message:

This is just a proof of concept that I hacked together real quick.

This changes how proxies are generated and lazy-loaded in a very radical way:

  • method calls do not cause lazy-loading
  • lazy-loading is triggered by access to non-transient properties (things that need to be lazy-loaded)
  • access to identifiers or non-mapped properties won't cause lazy-loading

Following BC breaks need to be fixed or discussed before going forward on this idea:

  • proxies don't implement Doctrine\Common\Proxy\Proxy anymore, but ProxyManager\Proxy\GhostObjectInterface (BC break, needs fixing, can be easily done with some effort)
  • serialize($proxy) now causes proxy initialization (probably needs fixing, as this is a major BC break)

Pending TODOs:

  • cloning a proxy is still not fully supported (requires dedicated logic in **clone)
  • this is just a PoC, so the code that writes proxies to disk is not yet in place
Originally created by @doctrinebot on GitHub (Jan 9, 2015). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of Ocramius: Url: https://github.com/doctrine/doctrine2/pull/1241 Message: This is just a proof of concept that I hacked together real quick. This changes how proxies are generated and lazy-loaded in a very radical way: - method calls do not cause lazy-loading - lazy-loading is triggered by access to non-transient properties (things that need to be lazy-loaded) - access to identifiers or non-mapped properties won't cause lazy-loading Following BC breaks need to be fixed or discussed before going forward on this idea: - [ ] proxies don't implement `Doctrine\Common\Proxy\Proxy` anymore, but `ProxyManager\Proxy\GhostObjectInterface` (BC break, needs fixing, can be easily done with some effort) - [ ] `serialize($proxy)` now causes proxy initialization (probably needs fixing, as this is a major BC break) Pending TODOs: - [ ] cloning a proxy is still not fully supported (requires dedicated logic in `**clone`) - [ ] this is just a PoC, so the code that writes proxies to disk is not yet in place
admin added the Bug label 2026-01-22 14:38:58 +01:00
admin closed this issue 2026-01-22 14:38:58 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 9, 2015):

@doctrinebot commented on GitHub (Jan 9, 2015): - is referenced by [DCOM-282: Use call_user_func_array in proxy classes](http://www.doctrine-project.org/jira/browse/DCOM-282)
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1241] was labeled:
https://github.com/doctrine/doctrine2/pull/1241

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1241] was labeled: https://github.com/doctrine/doctrine2/pull/1241
Author
Owner

@doctrinebot commented on GitHub (Jan 24, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1241] was labeled:
https://github.com/doctrine/doctrine2/pull/1241

@doctrinebot commented on GitHub (Jan 24, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1241] was labeled: https://github.com/doctrine/doctrine2/pull/1241
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4291