Skip to content

[Validator] Throw Symfony/OutOfBounds exception instead of default one in ConstraintViolationList #49881

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

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

VincentLanglet
Copy link
Contributor

Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? no
Tickets Fix #...
License MIT
Doc PR symfony/symfony-docs#...

Symfony seems to almost always using namespaced Exception rather than default one.
This is useful:

  • In order to do custom catch
  • When using static analysis and you want to track some exception and exclude others

But the ConstraintViolationList was throwing the PHP OutOfBounds exception even if a namespaced one exists for Validator component. This PR is BC and change this.

@fabpot
Copy link
Member

fabpot commented Apr 8, 2023

Thank you @VincentLanglet.

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

Successfully merging this pull request may close these issues.

4 participants