Skip to content

Commit b9064d6

Browse files
authored
Merge pull request #531 from ergebnis/feature/php72
Enhancement: Add support for PHP 7.2
2 parents 6cdc6ef + 8a174aa commit b9064d6

File tree

129 files changed

+301
-275
lines changed

Some content is hidden

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

129 files changed

+301
-275
lines changed

.github/settings.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ branches:
2121
- context: "Refactoring (7.4, locked)"
2222
- context: "Security Analysis (7.4, locked)"
2323
- context: "Static Code Analysis (7.4, locked)"
24+
- context: "Tests (7.5.0, 7.2, highest)"
25+
- context: "Tests (7.5.0, 7.2, lowest)"
2426
- context: "Tests (7.5.0, 7.3, highest)"
2527
- context: "Tests (7.5.0, 7.3, lowest)"
2628
- context: "Tests (7.5.0, 7.4, highest)"
2729
- context: "Tests (7.5.0, 7.4, lowest)"
30+
- context: "Tests (8.5.19, 7.2, highest)"
31+
- context: "Tests (8.5.19, 7.2, lowest)"
2832
- context: "Tests (8.5.19, 7.3, highest)"
2933
- context: "Tests (8.5.19, 7.3, lowest)"
3034
- context: "Tests (8.5.19, 7.4, highest)"

.github/workflows/integrate.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ jobs:
460460
- "7.5.0"
461461

462462
php-version:
463+
- "7.2"
463464
- "7.3"
464465
- "7.4"
465466

@@ -468,6 +469,14 @@ jobs:
468469
- "highest"
469470

470471
include:
472+
- phpunit-version: "8.5.19"
473+
php-version: "7.2"
474+
dependencies: "lowest"
475+
476+
- phpunit-version: "8.5.19"
477+
php-version: "7.2"
478+
dependencies: "highest"
479+
471480
- phpunit-version: "8.5.19"
472481
php-version: "7.3"
473482
dependencies: "lowest"

.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\Php73::create()
29+
$ruleSet = PhpCsFixer\Config\RuleSet\Php72::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.11.0...main`][2.11.0...main].
1010

11+
### Changed
12+
13+
- Added support for PHP 7.2 ([#531]), by [@localheinz]
14+
1115
## [`2.11.0`][2.11.0]
1216

1317
For a full diff see [`2.10.0...2.11.0`][2.10.0...2.11.0].
@@ -291,6 +295,7 @@ For a full diff see [`7afa59c...1.0.0`][7afa59c...1.0.0].
291295
[#491]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/491
292296
[#494]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/494
293297
[#495]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/495
298+
[#531]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/531
294299

295300
[@HypeMC]: https://github.com/HypeMC
296301
[@localheinz]: https://github.com/localheinz

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"security": "https://github.com/ergebnis/phpunit-slow-test-detector/blob/main/.github/SECURITY.md"
2525
},
2626
"require": {
27-
"php": "~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
27+
"php": "~7.2.0 || ~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": {

composer.lock

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

rector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
__DIR__ . '/test/',
2424
]);
2525

26-
$rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_73);
26+
$rectorConfig->phpVersion(ValueObject\PhpVersion::PHP_72);
2727
};

src/Duration.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ public static function fromSecondsAndNanoseconds(
5757
if ($maxNanoseconds < $nanoseconds) {
5858
throw Exception\InvalidNanoseconds::notLessThanOrEqualTo(
5959
$nanoseconds,
60-
$maxNanoseconds,
60+
$maxNanoseconds
6161
);
6262
}
6363

6464
return new self(
6565
$seconds,
66-
$nanoseconds,
66+
$nanoseconds
6767
);
6868
}
6969

@@ -78,14 +78,14 @@ public static function fromMilliseconds(int $milliseconds): self
7878

7979
$seconds = \intdiv(
8080
$milliseconds,
81-
1000,
81+
1000
8282
);
8383

8484
$nanoseconds = ($milliseconds - $seconds * 1000) * 1000000;
8585

8686
return new self(
8787
$seconds,
88-
$nanoseconds,
88+
$nanoseconds
8989
);
9090
}
9191

@@ -107,13 +107,13 @@ public function add(self $other): self
107107
if (999999999 < $nanoseconds) {
108108
return new self(
109109
$seconds + 1,
110-
$nanoseconds - 1000000000,
110+
$nanoseconds - 1000000000
111111
);
112112
}
113113

114114
return new self(
115115
$seconds,
116-
$nanoseconds,
116+
$nanoseconds
117117
);
118118
}
119119

src/Exception/InvalidCount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static function notGreaterThanZero(int $value): self
2222
{
2323
return new self(\sprintf(
2424
'Value should be greater than 0, but %d is not.',
25-
$value,
25+
$value
2626
));
2727
}
2828
}

src/Exception/InvalidMilliseconds.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static function notGreaterThanZero(int $value): self
2222
{
2323
return new self(\sprintf(
2424
'Value should be greater than 0, but %d is not.',
25-
$value,
25+
$value
2626
));
2727
}
2828
}

0 commit comments

Comments
 (0)