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

Fixes Validator Testcase #1437

Merged
merged 16 commits into from
Jul 10, 2022
Merged

Fixes Validator Testcase #1437

merged 16 commits into from
Jul 10, 2022

Conversation

Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Jul 9, 2022

Subject

I am targeting this branch, because i don't know if BC or not.

It fixes this:

2x: Passing a null message when instantiating a "Symfony\Component\Validator\ConstraintViolation" is deprecated since Symfony 4.4.
1x in UniqueUrlValidatorTest::testValidateWithPageFound from Sonata\PageBundle\Tests\Validator
1x in UniqueUrlValidatorTest::testValidateWithRootUrlAndNoParent from Sonata\PageBundle\Tests\Validator

The main reason for this was the faulty Translator Mock used.
I updated the tests to check for the Violations.

Closes #{put_issue_number_here}.

Changelog

### Changed
- Updated ValidatorTest to use ConstraintValidatorTestCase

@Hanmac Hanmac mentioned this pull request Jul 9, 2022
17 tasks
@VincentLanglet
Copy link
Member

I am targeting this branch, because i don't know if BC or not.

Since all the deprecations will only be solved on 4.x. You can do most of all the PR on 4.x, it's easier.
The only needed PR on 3.x are the one which deprecate some PageBundle code.

jordisala1991
jordisala1991 previously approved these changes Jul 10, 2022
Copy link
Member

@jordisala1991 jordisala1991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the translations all good!

Hanmac and others added 2 commits July 10, 2022 12:26
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Hanmac and others added 9 commits July 10, 2022 15:27
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Co-authored-by: Vincent Langlet <VincentLanglet@users.noreply.github.com>
@VincentLanglet VincentLanglet merged commit 472117a into sonata-project:4.x Jul 10, 2022
@VincentLanglet
Copy link
Member

Thanks

@Hanmac Hanmac deleted the validatorRework branch July 10, 2022 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants