Skip to content

Commit 5a01f0e

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Prevent parsing invalid octal digits as octal numbers [DI] fix ContainerBuilder on PHP8 [Console] Make sure $maxAttempts is an int or null. [VarDumper] Fix caster for invalid SplFileInfo objects on php 8. [Intl] Skip test cases that produce a TypeError on php 8. [PhpUnitBridge] Adjust output parsing for PHPUnit 9.3. [PhpUnitBridge] CoverageListenerTrait update for PHPUnit 8.5/9.x add bosnian (bs) translation [Debug] Parse "x not found" errors correctly on php 8.
2 parents 2b39472 + 32ac87d commit 5a01f0e

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

Tests/NumberFormatter/AbstractNumberFormatterTest.php

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,16 @@ public function testFormatFractionDigits($value, $expected, $fractionDigits = nu
377377

378378
public function formatFractionDigitsProvider()
379379
{
380-
return [
381-
[1.123, '1.123', null, 0],
382-
[1.123, '1', 0, 0],
383-
[1.123, '1.1', 1, 1],
384-
[1.123, '1.12', 2, 2],
385-
[1.123, '1.123', -1, 0],
386-
[1.123, '1', 'abc', 0],
387-
];
380+
yield [1.123, '1.123', null, 0];
381+
yield [1.123, '1', 0, 0];
382+
yield [1.123, '1.1', 1, 1];
383+
yield [1.123, '1.12', 2, 2];
384+
yield [1.123, '1.123', -1, 0];
385+
386+
if (\PHP_VERSION_ID < 80000) {
387+
// This dataset will produce a TypeError on php 8.
388+
yield [1.123, '1', 'abc', 0];
389+
}
388390
}
389391

390392
/**
@@ -410,14 +412,16 @@ public function testFormatGroupingUsed($value, $expected, $groupingUsed = null,
410412

411413
public function formatGroupingUsedProvider()
412414
{
413-
return [
414-
[1000, '1,000', null, 1],
415-
[1000, '1000', 0, 0],
416-
[1000, '1,000', 1, 1],
417-
[1000, '1,000', 2, 1],
418-
[1000, '1000', 'abc', 0],
419-
[1000, '1,000', -1, 1],
420-
];
415+
yield [1000, '1,000', null, 1];
416+
yield [1000, '1000', 0, 0];
417+
yield [1000, '1,000', 1, 1];
418+
yield [1000, '1,000', 2, 1];
419+
yield [1000, '1,000', -1, 1];
420+
421+
if (\PHP_VERSION_ID < 80000) {
422+
// This dataset will produce a TypeError on php 8.
423+
yield [1000, '1000', 'abc', 0];
424+
}
421425
}
422426

423427
/**

0 commit comments

Comments
 (0)