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

Appearance settings

Commit f3c1ef1

Browse filesBrowse files
bug #49027 [Clock] Make ClockAwareTrait use the global clock by default (nicolas-grekas)
This PR was merged into the 6.3 branch. Discussion ---------- [Clock] Make ClockAwareTrait use the global clock by default | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Let's make `ClockAwareTrait` compatible with `Clock::now()` from #48642 by default. Commits ------- ec60013 [Clock] Make ClockAwareTrait use the global clock by default
2 parents 1f7bc10 + ec60013 commit f3c1ef1
Copy full SHA for f3c1ef1

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Clock/ClockAwareTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Clock/ClockAwareTrait.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public function setClock(ClockInterface $clock): void
3131

3232
protected function now(): \DateTimeImmutable
3333
{
34-
return ($this->clock ??= new NativeClock())->now();
34+
return ($this->clock ??= new Clock())->now();
3535
}
3636
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.