You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The traverse option doesn't work when using a Valid constraint as Attribute.
How to reproduce
useSymfony\Component\Validator\ConstraintsasAssert;
// var will not be traversedclass SomeAnnotationClass {
/** @Assert\Valid(traverse=false) */private$someVar;
}
// var WILL be traversedclass SomeAttributeClass {
#[Assert\Valid(traverse: false)]
private$someVar;
}
Possible Solution
The constructor of Symfony\Component\Validator\Constraints\Valid isn't overridden (like many other constraints) to add the traverse named option.