-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Fix auto-mapping constraints should not be validated #34694
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
[Validator] Fix auto-mapping constraints should not be validated #34694
Conversation
/** | ||
* @see AutoMappingStrategy | ||
*/ | ||
public function getAutoMappingStrategy(): int |
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.
Worth adding to the interface (@method
to get the deprec), or adding a new AutoMappingMetadataInterface
?
AFAIK, implementations all rely on GenericMetadata
classes, so might only be an implementation detail.
Tested on my side, it solves the issue, no-side effects noticed. |
Would it not make sense to not let both classes extend |
If I understand your suggestion, extending Constraint is required for now to leverage the existing infrastructure to load this annotations & call That's why I mentioned the |
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.
lgtm
Thank you @ogizanagi. |
…idated (ogizanagi) This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [Validator] Fix auto-mapping constraints should not be validated | Q | A | ------------- | --- | Branch? | 4.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | #34672 <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | N/A As for `Traverse`, I don't think we should add these "constraints" to the list. I'm also wondering if it really makes sense to have these annotations as constraints. I think it should rather behave like the `GroupSequence` annotation to add the info the generic metadata at loading time, but we don't need to rely on the constraints behavior at all. Commits ------- bc53e4b [Validator] Fix auto-mapping constraints should not be validated
As for
Traverse
, I don't think we should add these "constraints" to the list.I'm also wondering if it really makes sense to have these annotations as constraints. I think it should rather behave like the
GroupSequence
annotation to add the info the generic metadata at loading time, but we don't need to rely on the constraints behavior at all.