-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Remove unnecessary usages of DateTime #50297
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
Conversation
2cb8075
to
0a72104
Compare
src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php
Show resolved
Hide resolved
3f7ba45
to
9080163
Compare
@@ -93,6 +93,7 @@ public static function guessTypeProvider() | |||
[new Type('long'), new TypeGuess(IntegerType::class, [], Guess::MEDIUM_CONFIDENCE)], | |||
[new Type('string'), new TypeGuess(TextType::class, [], Guess::LOW_CONFIDENCE)], | |||
[new Type(\DateTime::class), new TypeGuess(DateType::class, [], Guess::MEDIUM_CONFIDENCE)], | |||
[new Type(\DateTimeImmutable::class), new TypeGuess(DateType::class, ['input' => 'datetime_immutable'], Guess::MEDIUM_CONFIDENCE)], |
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.
Missing a case for \DateTimeInterface::class
?
@nicolas-grekas Can you have a look at the tests, they seem broken by your changes. |
59005e7
to
b551392
Compare
PR ready, failures are now false-positives. |
This is for 6.4 right, given we are close to RC phase? |
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.
While i'm tempted to vote 6.3 given it is the continuation a long-running work started a while ago, I think every public method signature changed in this PR deserves to be mentioned in the relevant changelog. It is likely going to impact a lot of final applications as they have to deal with that flaw and they often do it the wrong way (mostly on/because legacy code). So a whole set of beta releases wouldn't be too much either imho... we can't blame people to not test beta releases if we merge breaking changes after them, especially ones that don't bring much value from userland. I'd prefer postponing too
src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php
Show resolved
Hide resolved
b551392
to
8b08294
Compare
@chalasr UPGRADE/CHANGELOG files updated. |
Thank you @nicolas-grekas. |
Together with #50290, this PR removes
DateTime
everywhere possible.What remains is:
PersistentTokenInterface::getLastUsed(): \DateTime
- separate effort also