Skip to content

Commit 9bca4bd

Browse files
committed
minor #50297 Remove unnecessary usages of DateTime (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- Remove unnecessary usages of DateTime | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Part of #47580 | License | MIT | Doc PR | - Together with #50290, this PR removes `DateTime` everywhere possible. What remains is: - test cases that test both DateTime and DateTimeImmutable - legit to keep - date/time form-types and transformers in the Form component - we'd need a separate effort for them, related to #50295 - `PersistentTokenInterface::getLastUsed(): \DateTime` - separate effort also Commits ------- 8b08294b63 Remove unnecessary usages of DateTime
2 parents ead2a4a + a7326c9 commit 9bca4bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ $email = (new TemplatedEmail())
5757
// ...
5858
->htmlTemplate('emails/signup.html.twig')
5959
->context([
60-
'expiration_date' => new \DateTime('+7 days'),
60+
'expiration_date' => new \DateTimeImmutable('+7 days'),
6161
'username' => 'foo',
6262
])
6363
;

0 commit comments

Comments
 (0)