Skip to content

Commit 096644c

Browse files
committed
Enhancement: Add support for PHP 7.3
1 parent 32e5975 commit 096644c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+719
-192
lines changed

.github/workflows/integrate.yaml

+12-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
5959

6060
- name: "Remove incompatible dependencies with composer"
61-
run: "composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress"
61+
run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress"
6262

6363
- name: "Require phpunit/phpunit:^${{ matrix.phpunit-version }}"
6464
run: "composer require phpunit/phpunit:^${{ matrix.phpunit-version }} --ansi --no-interaction --no-progress --update-with-all-dependencies"
@@ -249,7 +249,7 @@ jobs:
249249
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
250250

251251
- name: "Remove incompatible dependencies with composer"
252-
run: "composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress"
252+
run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress"
253253

254254
- name: "Remove phpunit/phpunit with composer"
255255
run: "composer remove phpunit/phpunit --ansi --no-interaction --ignore-platform-reqs --no-progress"
@@ -461,6 +461,7 @@ jobs:
461461
- "9.0.0"
462462

463463
php-version:
464+
- "7.3"
464465
- "7.4"
465466
- "8.0"
466467
- "8.1"
@@ -472,6 +473,14 @@ jobs:
472473
- "highest"
473474

474475
include:
476+
- phpunit-version: "7.5.0"
477+
php-version: "7.3"
478+
dependencies: "lowest"
479+
480+
- phpunit-version: "7.5.0"
481+
php-version: "7.3"
482+
dependencies: "highest"
483+
475484
- phpunit-version: "7.5.0"
476485
php-version: "7.4"
477486
dependencies: "lowest"
@@ -555,7 +564,7 @@ jobs:
555564

556565
- name: "Remove incompatible dependencies with composer"
557566
if: "matrix.dependencies != 'locked'"
558-
run: "composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress"
567+
run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress"
559568

560569
- name: "Remove platform configuration with composer"
561570
if: "matrix.dependencies != 'locked'"

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
5757

5858
- name: "Remove incompatible dependencies with composer"
59-
run: "composer remove ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress"
59+
run: "composer remove ergebnis/composer-normalize ergebnis/license ergebnis/php-cs-fixer-config psalm/plugin-phpunit vimeo/psalm --ansi --dev --no-interaction --no-progress"
6060

6161
- name: "Remove phpunit/phpunit with composer"
6262
run: "composer remove phpunit/phpunit --ansi --no-interaction --ignore-platform-reqs --no-progress"

.php-cs-fixer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
$license->save();
2828

29-
$ruleSet = PhpCsFixer\Config\RuleSet\Php74::create()
29+
$ruleSet = PhpCsFixer\Config\RuleSet\Php73::create()
3030
->withHeader($license->header())
3131
->withRules(PhpCsFixer\Config\Rules::fromArray([
3232
'mb_str_functions' => false,

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
For a full diff see [`2.10.0...main`][2.10.0...main].
1010

11+
### Changed
12+
13+
- Added support for PHP 7.3 ([#476]), by [@localheinz]
14+
1115
## [`2.10.0`][2.10.0]
1216

1317
For a full diff see [`2.9.0...2.10.0`][2.9.0...2.10.0].
@@ -276,6 +280,7 @@ For a full diff see [`7afa59c...1.0.0`][7afa59c...1.0.0].
276280
[#396]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/396
277281
[#447]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/447
278282
[#448]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/448
283+
[#476]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/476
279284
[#485]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/485
280285
[#491]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/491
281286
[#494]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/494

composer.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@
2424
"security": "https://github.com/ergebnis/phpunit-slow-test-detector/blob/main/.github/SECURITY.md"
2525
},
2626
"require": {
27-
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
27+
"php": "~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
2828
"phpunit/phpunit": "^7.5.0 || ^8.5.19 || ^9.0.0 || ^10.0.0 || ^11.0.0"
2929
},
3030
"require-dev": {
3131
"ergebnis/composer-normalize": "^2.42.0",
32-
"ergebnis/data-provider": "^3.2.0",
3332
"ergebnis/license": "^2.4.0",
3433
"ergebnis/php-cs-fixer-config": "^6.25.1",
35-
"fakerphp/faker": "^1.23.1",
34+
"fakerphp/faker": "~1.20.0",
3635
"psalm/plugin-phpunit": "~0.19.0",
3736
"rector/rector": "^1.0.4",
3837
"vimeo/psalm": "^5.23.1"

composer.lock

+15-74
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

psalm-baseline.xml

+93-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
</file>
1414
<file src="src/Formatter/DefaultDurationFormatter.php">
1515
<InvalidOperand>
16-
<code><![CDATA[$duration->seconds() * 1_000 + $duration->nanoseconds() / 1_000_000]]></code>
16+
<code><![CDATA[$duration->seconds() * 1000 + $duration->nanoseconds() / 1000000]]></code>
1717
<code><![CDATA[$durationInMilliseconds - $hoursInMilliseconds]]></code>
1818
<code><![CDATA[$durationInMilliseconds - $hoursInMilliseconds]]></code>
1919
<code><![CDATA[$durationInMilliseconds / 60]]></code>
2020
<code><![CDATA[$durationInMilliseconds / 60]]></code>
21-
<code><![CDATA[($durationInMilliseconds - $hoursInMilliseconds - $minutesInMilliseconds) / 1_000]]></code>
21+
<code><![CDATA[($durationInMilliseconds - $hoursInMilliseconds - $minutesInMilliseconds) / 1000]]></code>
2222
</InvalidOperand>
2323
</file>
2424
<file src="src/Subscriber/Test/FinishedSubscriber.php">
@@ -60,6 +60,47 @@
6060
<code><![CDATA[$reporter]]></code>
6161
</UnusedParam>
6262
</file>
63+
<file src="test/DataProvider/AbstractProvider.php">
64+
<MixedAssignment>
65+
<code><![CDATA[$value]]></code>
66+
</MixedAssignment>
67+
<UndefinedClass>
68+
<code><![CDATA[Exception\EmptyValues]]></code>
69+
<code><![CDATA[Exception\EmptyValues]]></code>
70+
<code><![CDATA[Exception\EmptyValues]]></code>
71+
</UndefinedClass>
72+
<UndefinedDocblockClass>
73+
<code><![CDATA[Exception\EmptyValues]]></code>
74+
<code><![CDATA[Exception\EmptyValues]]></code>
75+
</UndefinedDocblockClass>
76+
</file>
77+
<file src="test/DataProvider/IntProvider.php">
78+
<MixedReturnTypeCoercion>
79+
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
80+
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
81+
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
82+
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
83+
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
84+
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
85+
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
86+
</MixedReturnTypeCoercion>
87+
<UnusedClass>
88+
<code><![CDATA[IntProvider]]></code>
89+
</UnusedClass>
90+
</file>
91+
<file src="test/DataProvider/StringProvider.php">
92+
<MixedReturnTypeCoercion>
93+
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
94+
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
95+
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
96+
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
97+
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
98+
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
99+
</MixedReturnTypeCoercion>
100+
<UnusedClass>
101+
<code><![CDATA[StringProvider]]></code>
102+
</UnusedClass>
103+
</file>
63104
<file src="test/EndToEnd/Version07/TestCase/Combination/SleeperTest.php">
64105
<PossiblyUnusedMethod>
65106
<code><![CDATA[sleepWithAfterAnnotation]]></code>
@@ -409,9 +450,55 @@
409450
<code><![CDATA[$this->milliseconds * 1000]]></code>
410451
</ArgumentTypeCoercion>
411452
</file>
412-
<file src="test/Unit/Reporter/DefaultReporterTest.php">
413-
<MixedReturnStatement>
414-
<code><![CDATA[iterable]]></code>
415-
</MixedReturnStatement>
453+
<file src="test/Unit/Attribute/MaximumDurationTest.php">
454+
<UndefinedClass>
455+
<code><![CDATA[testConstructorRejectsInvalidValue]]></code>
456+
<code><![CDATA[testConstructorRejectsInvalidValue]]></code>
457+
</UndefinedClass>
458+
</file>
459+
<file src="test/Unit/Console/ColorTest.php">
460+
<UndefinedClass>
461+
<code><![CDATA[testDimReturnsOriginalStringWhenItIsWhitespaceOnly]]></code>
462+
<code><![CDATA[testDimReturnsOriginalStringWhenItIsWhitespaceOnly]]></code>
463+
</UndefinedClass>
464+
</file>
465+
<file src="test/Unit/CountTest.php">
466+
<UndefinedClass>
467+
<code><![CDATA[testFromIntRejectsInvalidValue]]></code>
468+
<code><![CDATA[testFromIntRejectsInvalidValue]]></code>
469+
<code><![CDATA[testFromIntReturnsCount]]></code>
470+
</UndefinedClass>
471+
</file>
472+
<file src="test/Unit/DurationTest.php">
473+
<UndefinedClass>
474+
<code><![CDATA[testFromMillisecondsRejectsInvalidValue]]></code>
475+
<code><![CDATA[testFromSecondsAndNanosecondsRejectsNanosecondsGreaterThan999999999]]></code>
476+
<code><![CDATA[testFromSecondsAndNanosecondsRejectsNanosecondsLessThanZero]]></code>
477+
<code><![CDATA[testFromSecondsAndNanosecondsRejectsSecondsLessThanZero]]></code>
478+
</UndefinedClass>
479+
</file>
480+
<file src="test/Unit/PhaseIdentifierTest.php">
481+
<UndefinedClass>
482+
<code><![CDATA[testFromStringRejectsInvalidValue]]></code>
483+
<code><![CDATA[testFromStringRejectsInvalidValue]]></code>
484+
</UndefinedClass>
485+
</file>
486+
<file src="test/Unit/TestIdentifierTest.php">
487+
<UndefinedClass>
488+
<code><![CDATA[testFromStringRejectsInvalidValue]]></code>
489+
<code><![CDATA[testFromStringRejectsInvalidValue]]></code>
490+
</UndefinedClass>
491+
</file>
492+
<file src="test/Unit/Version/MajorTest.php">
493+
<UndefinedClass>
494+
<code><![CDATA[testFromIntRejectsInvalidValue]]></code>
495+
<code><![CDATA[testFromStringReturnsMajor]]></code>
496+
<code><![CDATA[testFromStringReturnsMajor]]></code>
497+
</UndefinedClass>
498+
</file>
499+
<file src="test/Unit/Version/SeriesTest.php">
500+
<UndefinedClass>
501+
<code><![CDATA[testFromStringRejectsInvalidValue]]></code>
502+
</UndefinedClass>
416503
</file>
417504
</files>

rector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
__DIR__ . '/test/',
2626
]);
2727

28-
$rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_74);
28+
$rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_73);
2929
};

src/Attribute/MaximumDuration.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
#[\Attribute(\Attribute::TARGET_METHOD)]
1919
final class MaximumDuration
2020
{
21-
private int $milliseconds;
21+
/**
22+
* @var int
23+
*/
24+
private $milliseconds;
2225

2326
/**
2427
* @throws Exception\InvalidMilliseconds

0 commit comments

Comments
 (0)