Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Validator] UniqueEntityValidator now use the 2.5 API #11579

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

Closed
wants to merge 1 commit into from

Conversation

hlecorche
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #11578
License MIT
Doc PR -

@stof
Copy link
Member

stof commented Aug 6, 2014

This is the wrong way to solve it. We must have 2 implementations, to be compatible with the 2.4 API as well.

@hlecorche
Copy link
Contributor Author

It is exact, sorry. I will create Symfony\Bridge\Doctrine\Validator\Const raints\LegacyUniqueEntityValidator .
But what is the best solution to fix LegacyConstraintValidatorFactory ? (The most clean solution because the validator namespace is different)

For tests, I am not sure: I can create LegacyUniqueEntityValidator2Dot4ApiTest.php and LegacyUniqueEntityValidatorLegacyApiTest.php. But how fix UniqueValidatorTest ?

Thanks

@webmozart
Copy link
Contributor

Hi @hlecorche! To fix this issue, it is necessary to refactor UniqueValidatorTest and create separate tests as in the Validator component. I'm working on this as I'd like to get the fix out ASAP.

@hlecorche
Copy link
Contributor Author

Ok thanks @webmozart

@stof
Copy link
Member

stof commented Aug 6, 2014

@webmozart given that this validator is registered as a sevrice in the different Doctrine bundles, you will have to do some changes in these bundles as well to change the class of the service based on the API version being used (which may be difficult when it is set to auto btw)

@webmozart
Copy link
Contributor

Replaced by #11582.

@webmozart webmozart closed this Aug 6, 2014
@webmozart
Copy link
Contributor

@stof Which bundles do you mean?

@stof
Copy link
Member

stof commented Aug 6, 2014

DoctrineBundle, DoctrineMongoDBBundle, DoctrinePHPCRBundle and DoctrinecouchDBBundle, i.e. all bundles registering an instance of the UniqueEntityValidator as service with the corresponding registry as argument

@webmozart
Copy link
Contributor

Fortunately that won't be necessary then. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants