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] Sync string to date behavior and throw a better exception#33439

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

Conversation

@fancyweb
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

\DateTimeImmutable are not compared with\DateTimeImmutable in theRangeValidator class (contrary to the behavior in theAbstractComparisonValidator class).
Also, let's throw a dedicated exception when the provided string value cannot be parsed to a\DateTime or\DateTimeImmutable. It's better than the default exception IMO.

@fancywebfancywebforce-pushed thevalidator-better-throw-on-invalid-dates branch from10873a4 to28d7d94CompareSeptember 3, 2019 09:02
@fabpot
Copy link
Member

Thank you@fancyweb.

fabpot added a commit that referenced this pull requestSep 3, 2019
…r exception (fancyweb)This PR was merged into the 3.4 branch.Discussion----------[Validator] Sync string to date behavior and throw a better exception| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -`\DateTimeImmutable` are not compared with `\DateTimeImmutable` in the `RangeValidator` class (contrary to the behavior in the `AbstractComparisonValidator` class).Also, let's throw a dedicated exception when the provided string value cannot be parsed to a `\DateTime` or `\DateTimeImmutable`. It's better than the default exception IMO.Commits-------28d7d94 [Validator] Sync string to date behavior and throw a better exception
@fabpotfabpot merged commit28d7d94 intosymfony:3.4Sep 3, 2019
@fancywebfancyweb deleted the validator-better-throw-on-invalid-dates branchSeptember 3, 2019 16:16
@nicolas-grekas
Copy link
Member

@fancyweb can you please submit the PR for 4.3? I don't know how to merge it and make tests pass. Thanks for your help.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

+1 more reviewer

@ro0NLro0NLro0NL approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@fancyweb@fabpot@nicolas-grekas@ro0NL@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp