-
Notifications
You must be signed in to change notification settings - Fork 233
Enable native lazy objects by default, add an option to disable it #940
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
Conversation
b2d1933 to
7d7d2e8
Compare
| // Requires doctrine/mongodb-odm 2.10 | ||
| $container->getDefinition('doctrine_mongodb') | ||
| ->setArgument(5, $config['enable_lazy_ghost_objects'] ? Proxy::class : LazyLoadingInterface::class); | ||
| ->setArgument(5, $config['enable_lazy_ghost_objects'] ? LazyLoadingInterface::class : Proxy::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a bug in the previous implementation, or why does this need changing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a bug in the previous implementation. Not covered by a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor wording change, but LGTM!
Co-authored-by: Andreas Braun <git@alcaeus.org>
Use native lazy objects by default when
PHP >= 7.4anddoctrine/mongodb-odm >= 2.14(doctrine/mongodb-odm#2840)Add a new option
enable_native_lazy_objectsto disable this behavior.Todo
AbstractManagerRegistry::$proxyInterfaceNamenullable MakeAbstractManagerRegistry::$proxyInterfaceNamenullable persistence#458