Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged

Conversation

@xabbuh
Copy link
Member

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?no
Issues
LicenseMIT

@OskarStarkOskarStark changed the title[Validator] support Stringable instances in all constraints[Validator] support\Stringable instances in all constraintsJan 3, 2024
@xabbuhxabbuhforce-pushed theconstraint-stringable-value branch from68e0cc3 to04bdd6cCompareJanuary 3, 2024 12:19
if (!\is_string($value) && !$valueinstanceof \Stringable) {
thrownewUnexpectedValueException($value,'string');
}
$passwordStrengthEstimator =$this->passwordStrengthEstimator ??self::estimateStrength(...);
Copy link
Member

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.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

indeed, done

@GromNaN
Copy link
Member

It would be better with tests.

@xabbuhxabbuhforce-pushed theconstraint-stringable-value branch from04bdd6c to05f9f45CompareJanuary 3, 2024 14:28
@xabbuh
Copy link
MemberAuthor

@GromNaN tests added

GromNaN reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

Thank you@xabbuh.

@nicolas-grekasnicolas-grekas merged commit4266345 intosymfony:7.1Jan 4, 2024
@xabbuhxabbuh deleted the constraint-stringable-value branchJanuary 4, 2024 07:35
@fabpotfabpot mentioned this pull requestMay 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@GromNaNGromNaNGromNaN approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

5 participants

@xabbuh@GromNaN@nicolas-grekas@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp