-
-
Notifications
You must be signed in to change notification settings - Fork 505
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 proxy class name resolvers instead of local workaround #2304
Use proxy class name resolvers instead of local workaround #2304
Conversation
/** | ||
* Returns the class name resolver which is used to resolve real class names for proxy objects. | ||
* | ||
* @deprecated |
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.
Shall we point user to what they should be using now? What about a runtime deprecation?
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.
That should've been marked internal and people shouldn't use it. I'll add a note in the upgrade file
/** | ||
* @internal | ||
*/ | ||
final class CachingClassNameResolver implements ClassNameResolver | ||
final class CachingClassNameResolver implements ClassNameResolver, ProxyClassNameResolver |
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.
Shouldn't this implementation be also moved to doctrine/common? I imagine all out libraries will want to have one
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.
I can move it to doctrine/common, but that would delay this change. Since this class is internal, I'll mess with it in as many minor releases as I can.
@@ -4,6 +4,7 @@ | |||
|
|||
namespace Doctrine\ODM\MongoDB\Proxy\Resolver; | |||
|
|||
/** @deprecated */ |
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.
This also lacka information when this will be removed and what to use instead
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.
Yep, will add documentation around this deprecation as well.
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.
Thanks!
Summary
With the release of doctrine/persistence 2.2, we can now leverage class name resolvers in the metadata factory directly and can remove our workaround wherever we fetched metadata.