Skip to content

Commit 9d798b3

Browse files
Merge branch '6.2' into 6.3
* 6.2: [Clock] fix usleep deprecation warning [Cache] sync Redis6Proxy with upstream [HttpFoundation] IPv4-mapped IPv6 addresses incorrectly rejected Minor (comment only), part 2 [RateLimiter] Add typecast to Reservation::wait chore: fix syntax error [FrameworkBundle] add `kernel.locale_aware` tag to `LocaleSwitcher` [FrameworkBundle] Remove check of undefined service in mailer assertions [VarDumper] Ignore \Error in __debugInfo()
2 parents 3c4e92c + bb153da commit 9d798b3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

MonotonicClock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function sleep(float|int $seconds): void
6767
}
6868

6969
if (0 < $us = $seconds - $s) {
70-
usleep($us * 1E6);
70+
usleep((int) ($us * 1E6));
7171
}
7272
}
7373

NativeClock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function sleep(float|int $seconds): void
4141
}
4242

4343
if (0 < $us = $seconds - $s) {
44-
usleep($us * 1E6);
44+
usleep((int) ($us * 1E6));
4545
}
4646
}
4747

Tests/MonotonicClockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testSleep()
5656
usleep(10);
5757
$after = microtime(true);
5858

59-
$this->assertGreaterThanOrEqual($before + 1.5, $now);
59+
$this->assertGreaterThanOrEqual($before + 1.499999, $now);
6060
$this->assertLessThan($after, $now);
6161
$this->assertLessThan(1.9, $now - $before);
6262
$this->assertSame($tz, $clock->now()->getTimezone()->getName());

0 commit comments

Comments
 (0)