Skip to content

Commit

Permalink
Require PHP 8.0 (#39)
Browse files Browse the repository at this point in the history
* Require PHP 8.0

* Run CI on PHP 8 by default

* Fix $GLOBALS usage for PHP 8.1

* Get rid of unnecessary PHP 8.0 checks
  • Loading branch information
Slamdunk committed Nov 9, 2021
1 parent 6ce5218 commit ddc65c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -62,8 +62,8 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"

steps:
- name: "Checkout"
Expand All @@ -88,13 +88,8 @@ jobs:
restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-

- name: "Install dependencies"
if: ${{ matrix.php-version != '8.0' }}
run: "composer update --no-interaction --no-progress"

- name: "Install dependencies PHP 8.0"
if: ${{ matrix.php-version == '8.0' }}
run: "composer update --no-interaction --no-progress --ignore-platform-reqs"

- name: "Run tests"
timeout-minutes: 3
run: "vendor/bin/phpunit --no-coverage --no-logging"
Expand All @@ -107,7 +102,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -153,7 +148,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -190,7 +185,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

steps:
- name: "Checkout"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"php": ">=8.0",
"nikic/php-parser": "^v4.13.1",
"phpstan/phpstan": "^1.1.1"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/TestAsset/UnusedVariableRule/fixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function foo($ref)
$function2();

$_SESSION = ['var19' => 1];
$GLOBALS = null;
$GLOBALS['foo'] = 'bar';
}

class Test
Expand Down

0 comments on commit ddc65c0

Please sign in to comment.