Skip to content

Commit

Permalink
Merge pull request #758 from ergebnis/feature/php73
Browse files Browse the repository at this point in the history
Enhancement: Add support for PHP 7.3
  • Loading branch information
localheinz committed Feb 18, 2024
2 parents f84a6d4 + 58d17bd commit a9a8f18
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 78 deletions.
2 changes: 2 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ branches:
- context: "Refactoring (7.4, locked)"
- context: "Security Analysis (7.4, locked)"
- context: "Static Code Analysis (7.4, locked)"
- context: "Tests (7.3, highest)"
- context: "Tests (7.3, locked)"
- context: "Tests (7.4, highest)"
- context: "Tests (7.4, locked)"
- context: "Tests (7.4, lowest)"
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,13 @@ jobs:
- "locked"
- "highest"

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

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

steps:
- name: "Checkout"
uses: "actions/checkout@v4.1.1"
Expand Down Expand Up @@ -462,6 +469,10 @@ jobs:
if: "matrix.dependencies != 'locked'"
run: "composer config platform.php --ansi --unset"

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

- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "ergebnis/.github/actions/composer/install@1.9.0"
with:
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()->withHeader($license->header());
$ruleSet = PhpCsFixer\Config\RuleSet\Php73::create()->withHeader($license->header());

$config = PhpCsFixer\Config\Factory::fromRuleSet($ruleSet);

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ For a full diff see [`2.7.0...main`][2.7.0...main].

- Added support for PHP 8.0 ([#756]), by [@localheinz]
- Added support for PHP 7.4 ([#757]), by [@localheinz]
- Added support for PHP 7.3 ([#758]), by [@localheinz]

## [`2.7.0`][2.7.0]

Expand Down Expand Up @@ -170,6 +171,7 @@ For a full diff see [`36912f6...1.0.0`][36912f6...1.0.0].
[#680]: https://github.com/ergebnis/clock/pull/680
[#756]: https://github.com/ergebnis/clock/pull/756
[#757]: https://github.com/ergebnis/clock/pull/757
[#758]: https://github.com/ergebnis/clock/pull/758

[@ergebnis]: https://github.com/ergebnis
[@localheinz]: https://github.com/localheinz
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
"source": "https://github.com/ergebnis/clock"
},
"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",
"psr/clock": "^1.0.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.42.0",
"ergebnis/license": "^2.4.0",
"ergebnis/php-cs-fixer-config": "^6.22.0",
"ergebnis/phpunit-slow-test-detector": "^2.10.0",
"infection/infection": "~0.26.6",
"phpunit/phpunit": "^9.6.16",
"psalm/plugin-phpunit": "~0.18.4",
Expand Down
71 changes: 2 additions & 69 deletions composer.lock

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

2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__DIR__ . '/test/',
]);

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

$rectorConfig->sets([
PHPUnit\Set\PHPUnitSetList::PHPUNIT_90,
Expand Down
2 changes: 1 addition & 1 deletion src/FrozenClock.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

final class FrozenClock implements Clock
{
private \DateTimeImmutable $now;
private $now;

public function __construct(\DateTimeImmutable $now)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SystemClock.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

final class SystemClock implements Clock
{
private \DateTimeZone $timezone;
private $timezone;

public function __construct(\DateTimeZone $timezone)
{
Expand Down
3 changes: 0 additions & 3 deletions test/Unit/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
<directory suffix=".php">../../src/</directory>
</include>
</coverage>
<extensions>
<extension class="Ergebnis\PHPUnit\SlowTestDetector\Extension"/>
</extensions>
<testsuites>
<testsuite name="Unit Tests">
<directory>.</directory>
Expand Down

0 comments on commit a9a8f18

Please sign in to comment.