Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Validator] support\Stringable instances in all constraints#53374
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedJan 3, 2024
| Q | A |
|---|---|
| Branch? | 7.1 |
| Bug fix? | no |
| New feature? | yes |
| Deprecations? | no |
| Issues | |
| License | MIT |
f118c4f to68e0cc3Compare\Stringable instances in all constraints68e0cc3 to04bdd6cCompare| if (!\is_string($value) && !$valueinstanceof \Stringable) { | ||
| thrownewUnexpectedValueException($value,'string'); | ||
| } | ||
| $passwordStrengthEstimator =$this->passwordStrengthEstimator ??self::estimateStrength(...); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The value may be casted to(string) when calling$passwordStrengthEstimator($value). We don't know how this is handled by the$passwordStrengthEstimator callable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
indeed, done
GromNaN commentedJan 3, 2024
It would be better with tests. |
04bdd6c to05f9f45Comparexabbuh commentedJan 3, 2024
@GromNaN tests added |
nicolas-grekas commentedJan 4, 2024
Thank you@xabbuh. |