-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator #17078
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
Can you please add a test case? |
e0847b0
to
93d00be
Compare
@nicolas-grekas, I added tests to check the functionality different types of "Collections". |
👍 |
Is this supposed to be a bugfix or a new feature? |
@xabbuh, these changes are closer to a new feature than to bug fixes. |
array($entity, new \ArrayIterator(array($entity))), | ||
array($entity, new ArrayCollection(array($entity))), | ||
); | ||
} |
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.
Imo for better readability the data provider should be near (above or below) the test method.
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 looked existing code - not so simple, there are different tests in different approaches. But I agree that the data provider close to the test easier to read. Fixed.
Expand the list of supported types of results returned from the repositories. Added processing of type \IteratorAggregate (and as a consequence doctrine Collection)
93d00be
to
db49aae
Compare
👍 I would consider this a bugfix rather than a new feature. |
👍 for merging this into Symfony 2.3 |
Thank you @Disparity. |
…regate for UniqueEntityValidator (Disparity) This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #17078). Discussion ---------- [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Expand the list of supported types of results returned from the repositories. Added processing of type \IteratorAggregate (and as a consequence doctrine Collection) Commits ------- 6ebd179 Added support \IteratorAggregate for UniqueEntityValidator
Expand the list of supported types of results returned from the repositories.
Added processing of type \IteratorAggregate (and as a consequence doctrine Collection)