Skip to content
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

[Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator #17078

Conversation

Projects
None yet
5 participants
@Disparity
Copy link
Contributor

commented Dec 20, 2015

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)

@Disparity Disparity changed the title [Bridge / Doctrine / Validator] Added support \IteratorAggregate for UniqueEntityValidator [Bridge] [Doctrine] [Validator] Added support \IteratorAggregate for UniqueEntityValidator Dec 20, 2015

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Dec 22, 2015

Can you please add a test case?

@Disparity Disparity force-pushed the Disparity:feature-bridge-doctrine-unique-validator-support-collection branch 3 times, most recently from e0847b0 to 93d00be Dec 27, 2015

@Disparity

This comment has been minimized.

Copy link
Contributor Author

commented Dec 27, 2015

@nicolas-grekas, I added tests to check the functionality different types of "Collections".

@nicolas-grekas

This comment has been minimized.

Copy link
Member

commented Dec 28, 2015

👍

@xabbuh

This comment has been minimized.

Copy link
Member

commented Dec 28, 2015

Is this supposed to be a bugfix or a new feature?

@Disparity

This comment has been minimized.

Copy link
Contributor Author

commented Dec 28, 2015

@xabbuh, these changes are closer to a new feature than to bug fixes.
This allows the validator working with traversable results (which include doctrine collection), and not only with iterators and arrays.

array($entity, new \ArrayIterator(array($entity))),
array($entity, new ArrayCollection(array($entity))),
);
}

This comment has been minimized.

Copy link
@xabbuh

xabbuh Dec 28, 2015

Member

Imo for better readability the data provider should be near (above or below) the test method.

This comment has been minimized.

Copy link
@Disparity

Disparity Jan 10, 2016

Author Contributor

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.

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)

@Disparity Disparity force-pushed the Disparity:feature-bridge-doctrine-unique-validator-support-collection branch from 93d00be to db49aae Jan 10, 2016

@fabpot

This comment has been minimized.

Copy link
Member

commented Jan 10, 2016

👍 I would consider this a bugfix rather than a new feature.

@xabbuh

This comment has been minimized.

Copy link
Member

commented Jan 11, 2016

👍 for merging this into Symfony 2.3

@fabpot

This comment has been minimized.

Copy link
Member

commented Jan 11, 2016

Thank you @Disparity.

fabpot added a commit that referenced this pull request Jan 11, 2016

bug #17078 [Bridge] [Doctrine] [Validator] Added support \IteratorAgg…
…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

@fabpot fabpot closed this Jan 11, 2016

This was referenced Jan 14, 2016

@fabpot fabpot referenced this pull request Feb 3, 2016

Merged

Release v3.0.2 #17665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.