Skip to content

Commit

Permalink
Enhancement: Add support for PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Nov 29, 2023
1 parent d1e3341 commit af6b1b8
Show file tree
Hide file tree
Showing 11 changed files with 682 additions and 660 deletions.
17 changes: 10 additions & 7 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ branches:
required_approving_review_count: 1
required_status_checks:
checks:
- context: "Code Coverage (8.0, locked)"
- context: "Coding Standards (8.0, locked)"
- context: "Dependency Analysis (8.0, locked)"
- context: "Mutation Tests (8.0, locked)"
- context: "Refactoring (8.0, locked)"
- context: "Security Analysis (8.0, locked)"
- context: "Static Code Analysis (8.0, locked)"
- context: "Code Coverage (7.4, locked)"
- context: "Coding Standards (7.4, locked)"
- context: "Dependency Analysis (7.4, locked)"
- context: "Mutation Tests (7.4, locked)"
- context: "Refactoring (7.4, locked)"
- context: "Security Analysis (7.4, locked)"
- context: "Static Code Analysis (7.4, locked)"
- context: "Tests (7.4, highest)"
- context: "Tests (7.4, locked)"
- context: "Tests (7.4, lowest)"
- context: "Tests (8.0, highest)"
- context: "Tests (8.0, locked)"
- context: "Tests (8.0, lowest)"
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.4"

dependencies:
- "locked"
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.4"

dependencies:
- "locked"
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.4"

dependencies:
- "locked"
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.4"

dependencies:
- "locked"
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.4"

dependencies:
- "locked"
Expand Down Expand Up @@ -322,7 +322,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.4"

dependencies:
- "locked"
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.4"

dependencies:
- "locked"
Expand Down Expand Up @@ -425,6 +425,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
Expand Down Expand Up @@ -466,7 +467,7 @@ jobs:
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Remove incompatible dependencies with composer"
run: "composer remove ergebnis/composer-normalize ergebnis/php-cs-fixer-config --ansi --dev --ignore-platform-reqs --no-interaction --no-progress"
run: "composer remove ergebnis/composer-normalize ergebnis/php-cs-fixer-config infection/infection psalm/plugin-phpunit symfony/console vimeo/psalm --ansi --dev --ignore-platform-reqs --no-interaction --no-progress"

- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "ergebnis/.github/actions/composer/[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.0"
- "7.4"

dependencies:
- "locked"
Expand Down
2 changes: 1 addition & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-require-checker" version="~4.4.0" installed="4.4.0" location="./.phive/composer-require-checker" copy="false"/>
<phar name="composer-require-checker" version="~3.8.0" installed="3.8.0" location="./.phive/composer-require-checker" copy="false"/>
</phive>
4 changes: 3 additions & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

$license->save();

$config = PhpCsFixer\Config\Factory::fromRuleSet(new PhpCsFixer\Config\RuleSet\Php80($license->header()));
$config = PhpCsFixer\Config\Factory::fromRuleSet(new PhpCsFixer\Config\RuleSet\Php74($license->header()), [
'php_unit_internal_class' => false,
]);

$config->getFinder()
->exclude([
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For a full diff see [`0.2.0...main`][0.2.0...main].
### Added

- Added support for PHP 8.0 ([#36]), by [@localheinz]
- Added support for PHP 7.4 ([#37]), by [@localheinz]

## [`0.2.0`][0.2.0]

Expand Down Expand Up @@ -43,5 +44,6 @@ For a full diff see [`fd198f0...0.1.0`][fd198f0...0.1.0].
[#3]: https://github.com/ergebnis/rector-rules/pull/3
[#34]: https://github.com/ergebnis/rector-rules/pull/34
[#36]: https://github.com/ergebnis/rector-rules/pull/36
[#37]: https://github.com/ergebnis/rector-rules/pull/37

[@localheinz]: https://github.com/localheinz
7 changes: 6 additions & 1 deletion composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"symbol-whitelist": [
"array",
"bool",
"false",
"null",
"PHPStan\\Reflection\\ClassReflection",
"Rector\\Core\\Rector\\AbstractRector",
"Rector\\Core\\Reflection\\ReflectionResolver"
"Rector\\Core\\Reflection\\ReflectionResolver",
"true"
]
}
19 changes: 9 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@
"security": "https://github.com/ergebnis/rector-rules/blob/main/.github/SECURITY.md"
},
"require": {
"php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"nikic/php-parser": "^4.17.1",
"phpstan/phpstan": "^1.10.36",
"rector/rector": "~0.18.5",
"symplify/rule-doc-generator-contracts": "^11.1.10"
"symplify/rule-doc-generator-contracts": "^9.3.26"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.31.0",
"ergebnis/data-provider": "^1.3.0",
"ergebnis/license": "^2.1.0",
"ergebnis/php-cs-fixer-config": "^5.9.2",
"fakerphp/faker": "^1.23.0",
"infection/infection": "~0.26.19",
"ergebnis/composer-normalize": "^2.28.3",
"ergebnis/data-provider": "^1.2.0",
"ergebnis/license": "^2.0.0",
"ergebnis/php-cs-fixer-config": "^4.11.0",
"infection/infection": "~0.26.6",
"phpunit/phpunit": "^9.6.13",
"psalm/plugin-phpunit": "~0.18.4",
"vimeo/psalm": "^5.16.0"
Expand All @@ -47,8 +46,8 @@
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"ergebnis/composer-normalize": true,
"infection/extension-installer": true
"infection/extension-installer": true,
"ergebnis/composer-normalize": true
},
"audit": {
"abandoned": "report"
Expand Down
Loading

0 comments on commit af6b1b8

Please sign in to comment.