Skip to content
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

Use LazyGhostObject for proxy objects #877

Merged
merged 3 commits into from
Jan 29, 2025
Merged

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Jan 22, 2025

Requires the release of doctrine/mongodb-odm: 2.10 with LazyGhostObject support provided by symfony/var-exporter:

Enable UseLazyGhostObject configuration and fix proxy interface after the default configuration is reset to Proxy Manager by doctrine/mongodb-odm#2720 for compatibility with older versions of the bundle.

New configuration setting: enable_lazy_ghost_objects which is true by default when the feature is available.

composer.json Outdated Show resolved Hide resolved
@alcaeus
Copy link
Member

alcaeus commented Jan 23, 2025

LGTM in general. Do we want to give people the opportunity to disable lazy ghost objects in the config (and default to true with the setting), or would that complicate things considering we're passing the interface name to the ManagerRegistry?

@GromNaN
Copy link
Member Author

GromNaN commented Jan 23, 2025

I added a configuration that is true when the feature is available, and reverted the need to update minimal version of doctrine/mongodb-odm.

@GromNaN GromNaN marked this pull request as ready for review January 23, 2025 08:30
@GromNaN GromNaN requested review from franmomu and malarzm January 23, 2025 08:30
@@ -39,6 +40,13 @@ public function getConfigTreeBuilder(): TreeBuilder
->children()
->scalarNode('proxy_namespace')->defaultValue('MongoDBODMProxies')->end()
->scalarNode('proxy_dir')->defaultValue('%kernel.cache_dir%/doctrine/odm/mongodb/Proxies')->end()
->booleanNode('enable_lazy_ghost_objects')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GromNaN GromNaN added this to the 5.2.0 milestone Jan 24, 2025
@GromNaN GromNaN requested a review from alcaeus January 29, 2025 15:26
@GromNaN GromNaN merged commit 6cd47b8 into doctrine:5.2.x Jan 29, 2025
12 checks passed
@GromNaN GromNaN deleted the use-lazy-ghost branch January 29, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants