-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Exception when persisting class unlisted in disciminator map (Issue 867) #1887
Conversation
tests/Doctrine/ODM/MongoDB/Tests/Functional/ReferencePrimerTest.php
Outdated
Show resolved
Hide resolved
a46ec90
to
fb84eea
Compare
This answers one of my comments :) I don't think we should go that far, not specifying |
@malarzm , I really gone to far with strictness). I will decrease checks for making |
@watari I think I've answered all questions, but I think that the best course of action would be to create this PR once again and only introducing the exception. It should be easier than reverting all changes that will no longer be needed :) |
804b1c2
to
b577752
Compare
… discriminator map.
@malarzm , it was not so hard to revert partially changes and introduce only exception in this PR). Also I updated PR description. Can you, please, check all again? |
tests/Doctrine/ODM/MongoDB/Tests/Functional/Ticket/GH267Test.php
Outdated
Show resolved
Hide resolved
…iscriminator map from ClassMetadata class. Replaced tests and docs class name literals by `::class` constants. Updated docs according to new behaviour with unregistered classes.
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.
Apart from documentation wording, this looks good! Great work @watari!
Updated docs according to suggestions |
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 @watari! 🎉
Summary
Updated persisting logic to throw exception of class is not listed in discriminator map.
There is no new tests is added since library have a set of old tests that is cover most of the cases.
Right now exception message contain information only about unlisted class without parent class since in the places of the checks I don't find a way of extracting parent class info.