Skip to content

Commit 2cf9a81

Browse files
authored
Merge pull request #476 from ergebnis/feature/php73
Enhancement: Add support for PHP 7.3
2 parents 32e5975 + 24b5e64 commit 2cf9a81

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

+683
-204
lines changed

.github/workflows/integrate.yaml

Lines changed: 12 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 5 additions & 0 deletions
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
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",
36+
"psr/container": "~1.0.0",
3737
"rector/rector": "^1.0.4",
3838
"vimeo/psalm": "^5.23.1"
3939
},

composer.lock

Lines changed: 24 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

psalm-baseline.xml

Lines changed: 47 additions & 7 deletions
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,51 @@
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+
<PossiblyUnusedMethod>
88+
<code><![CDATA[arbitrary]]></code>
89+
<code><![CDATA[lessThanOne]]></code>
90+
<code><![CDATA[one]]></code>
91+
</PossiblyUnusedMethod>
92+
</file>
93+
<file src="test/DataProvider/StringProvider.php">
94+
<MixedReturnTypeCoercion>
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+
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
100+
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
101+
</MixedReturnTypeCoercion>
102+
<PossiblyUnusedMethod>
103+
<code><![CDATA[trimmed]]></code>
104+
<code><![CDATA[untrimmed]]></code>
105+
<code><![CDATA[withWhitespace]]></code>
106+
</PossiblyUnusedMethod>
107+
</file>
63108
<file src="test/EndToEnd/Version07/TestCase/Combination/SleeperTest.php">
64109
<PossiblyUnusedMethod>
65110
<code><![CDATA[sleepWithAfterAnnotation]]></code>
@@ -409,9 +454,4 @@
409454
<code><![CDATA[$this->milliseconds * 1000]]></code>
410455
</ArgumentTypeCoercion>
411456
</file>
412-
<file src="test/Unit/Reporter/DefaultReporterTest.php">
413-
<MixedReturnStatement>
414-
<code><![CDATA[iterable]]></code>
415-
</MixedReturnStatement>
416-
</file>
417457
</files>

rector.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818
return static function (Config\RectorConfig $rectorConfig): void {
1919
$rectorConfig->cacheDirectory(__DIR__ . '/.build/rector/');
2020

21-
$rectorConfig->import(__DIR__ . '/vendor/fakerphp/faker/rector-migrate.php');
22-
2321
$rectorConfig->paths([
2422
__DIR__ . '/src/',
2523
__DIR__ . '/test/',
2624
]);
2725

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

0 commit comments

Comments
 (0)