Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Add support for PHP 7.3 #476

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

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

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

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

- name: "Remove phpunit/phpunit with composer"
run: "composer remove phpunit/phpunit --ansi --no-interaction --ignore-platform-reqs --no-progress"
Expand Down Expand Up @@ -461,6 +461,7 @@ jobs:
- "9.0.0"

php-version:
- "7.3"
- "7.4"
- "8.0"
- "8.1"
Expand All @@ -472,6 +473,14 @@ jobs:
- "highest"

include:
- phpunit-version: "7.5.0"
php-version: "7.3"
dependencies: "lowest"

- phpunit-version: "7.5.0"
php-version: "7.3"
dependencies: "highest"

- phpunit-version: "7.5.0"
php-version: "7.4"
dependencies: "lowest"
Expand Down Expand Up @@ -555,7 +564,7 @@ jobs:

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

- name: "Remove platform configuration with composer"
if: "matrix.dependencies != 'locked'"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

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

- name: "Remove phpunit/phpunit with composer"
run: "composer remove phpunit/phpunit --ansi --no-interaction --ignore-platform-reqs --no-progress"
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

$license->save();

$ruleSet = PhpCsFixer\Config\RuleSet\Php74::create()
$ruleSet = PhpCsFixer\Config\RuleSet\Php73::create()
->withHeader($license->header())
->withRules(PhpCsFixer\Config\Rules::fromArray([
'mb_str_functions' => false,
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

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

### Changed

- Added support for PHP 7.3 ([#476]), by [@localheinz]

## [`2.10.0`][2.10.0]

For a full diff see [`2.9.0...2.10.0`][2.9.0...2.10.0].
Expand Down Expand Up @@ -276,6 +280,7 @@ For a full diff see [`7afa59c...1.0.0`][7afa59c...1.0.0].
[#396]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/396
[#447]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/447
[#448]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/448
[#476]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/476
[#485]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/485
[#491]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/491
[#494]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/494
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
"security": "https://github.com/ergebnis/phpunit-slow-test-detector/blob/main/.github/SECURITY.md"
},
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"phpunit/phpunit": "^7.5.0 || ^8.5.19 || ^9.0.0 || ^10.0.0 || ^11.0.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.42.0",
"ergebnis/data-provider": "^3.2.0",
"ergebnis/license": "^2.4.0",
"ergebnis/php-cs-fixer-config": "^6.25.1",
"fakerphp/faker": "^1.23.1",
"fakerphp/faker": "~1.20.0",
"psalm/plugin-phpunit": "~0.19.0",
"psr/container": "~1.0.0",
"rector/rector": "^1.0.4",
"vimeo/psalm": "^5.23.1"
},
Expand Down
107 changes: 24 additions & 83 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 47 additions & 7 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
</file>
<file src="src/Formatter/DefaultDurationFormatter.php">
<InvalidOperand>
<code><![CDATA[$duration->seconds() * 1_000 + $duration->nanoseconds() / 1_000_000]]></code>
<code><![CDATA[$duration->seconds() * 1000 + $duration->nanoseconds() / 1000000]]></code>
<code><![CDATA[$durationInMilliseconds - $hoursInMilliseconds]]></code>
<code><![CDATA[$durationInMilliseconds - $hoursInMilliseconds]]></code>
<code><![CDATA[$durationInMilliseconds / 60]]></code>
<code><![CDATA[$durationInMilliseconds / 60]]></code>
<code><![CDATA[($durationInMilliseconds - $hoursInMilliseconds - $minutesInMilliseconds) / 1_000]]></code>
<code><![CDATA[($durationInMilliseconds - $hoursInMilliseconds - $minutesInMilliseconds) / 1000]]></code>
</InvalidOperand>
</file>
<file src="src/Subscriber/Test/FinishedSubscriber.php">
Expand Down Expand Up @@ -60,6 +60,51 @@
<code><![CDATA[$reporter]]></code>
</UnusedParam>
</file>
<file src="test/DataProvider/AbstractProvider.php">
<MixedAssignment>
<code><![CDATA[$value]]></code>
</MixedAssignment>
<UndefinedClass>
<code><![CDATA[Exception\EmptyValues]]></code>
<code><![CDATA[Exception\EmptyValues]]></code>
<code><![CDATA[Exception\EmptyValues]]></code>
</UndefinedClass>
<UndefinedDocblockClass>
<code><![CDATA[Exception\EmptyValues]]></code>
<code><![CDATA[Exception\EmptyValues]]></code>
</UndefinedDocblockClass>
</file>
<file src="test/DataProvider/IntProvider.php">
<MixedReturnTypeCoercion>
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
<code><![CDATA[\Generator<string, array{0: int}>]]></code>
</MixedReturnTypeCoercion>
<PossiblyUnusedMethod>
<code><![CDATA[arbitrary]]></code>
<code><![CDATA[lessThanOne]]></code>
<code><![CDATA[one]]></code>
</PossiblyUnusedMethod>
</file>
<file src="test/DataProvider/StringProvider.php">
<MixedReturnTypeCoercion>
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
<code><![CDATA[\Generator<string, array{0: string}>]]></code>
</MixedReturnTypeCoercion>
<PossiblyUnusedMethod>
<code><![CDATA[trimmed]]></code>
<code><![CDATA[untrimmed]]></code>
<code><![CDATA[withWhitespace]]></code>
</PossiblyUnusedMethod>
</file>
<file src="test/EndToEnd/Version07/TestCase/Combination/SleeperTest.php">
<PossiblyUnusedMethod>
<code><![CDATA[sleepWithAfterAnnotation]]></code>
Expand Down Expand Up @@ -409,9 +454,4 @@
<code><![CDATA[$this->milliseconds * 1000]]></code>
</ArgumentTypeCoercion>
</file>
<file src="test/Unit/Reporter/DefaultReporterTest.php">
<MixedReturnStatement>
<code><![CDATA[iterable]]></code>
</MixedReturnStatement>
</file>
</files>
4 changes: 1 addition & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
return static function (Config\RectorConfig $rectorConfig): void {
$rectorConfig->cacheDirectory(__DIR__ . '/.build/rector/');

$rectorConfig->import(__DIR__ . '/vendor/fakerphp/faker/rector-migrate.php');

$rectorConfig->paths([
__DIR__ . '/src/',
__DIR__ . '/test/',
]);

$rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_74);
$rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_73);
};
Loading
Loading