Skip to content

[Validator] ConstraintViolationBuilder: fromViolation(), addViolation(), setPath() #60746

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

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from

Conversation

rela589n
Copy link
Contributor

@rela589n rela589n commented Jun 9, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues #60582
License MIT

Hi, @xabbuh , @nicolas-grekas
First of all, sorry for disruption, I didn't want to disturb you. I just wanted to ask for such simple feature.

E.g. copy/pasting the existing code and tweaking it on your side to fit your need.

Regarding the last message probably you didn't understand me correctly. I was asking how you would implement yourself if you needed it yourself? I mean if you needed it somewhere in the code, and there's a another component where validation returns violation object and in your component you need to adjust its path, parameters, etc. You would use the builder as this, wouldn't you?

Again, sorry for taking your time, I really appreciate you for being patient with me.

@Spomky
Copy link
Contributor

Spomky commented Jun 10, 2025

Hi @rela589n

To be honest, I'm not aware of the full discussion/previous proposal.
Also, could you update the PR description with a bit more context? For example:

  • what problem you're trying to solve,
  • a concrete use case where it causes issues today,
  • and how your changes help (ideally with a quick before/after example).

That would really help with the review. Thanks!

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.

3 participants