Skip to content

Commit ddc65c0

Browse files
authored
Require PHP 8.0 (#39)
* 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
1 parent 6ce5218 commit ddc65c0

3 files changed

Lines changed: 7 additions & 12 deletions

File tree

.github/workflows/integrate.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
php-version:
18-
- "7.4"
18+
- "8.0"
1919

2020
steps:
2121
- name: "Checkout"
@@ -62,8 +62,8 @@ jobs:
6262
strategy:
6363
matrix:
6464
php-version:
65-
- "7.4"
6665
- "8.0"
66+
- "8.1"
6767

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

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

94-
- name: "Install dependencies PHP 8.0"
95-
if: ${{ matrix.php-version == '8.0' }}
96-
run: "composer update --no-interaction --no-progress --ignore-platform-reqs"
97-
9893
- name: "Run tests"
9994
timeout-minutes: 3
10095
run: "vendor/bin/phpunit --no-coverage --no-logging"
@@ -107,7 +102,7 @@ jobs:
107102
strategy:
108103
matrix:
109104
php-version:
110-
- "7.4"
105+
- "8.0"
111106

112107
steps:
113108
- name: "Checkout"
@@ -153,7 +148,7 @@ jobs:
153148
strategy:
154149
matrix:
155150
php-version:
156-
- "7.4"
151+
- "8.0"
157152

158153
steps:
159154
- name: "Checkout"
@@ -190,7 +185,7 @@ jobs:
190185
strategy:
191186
matrix:
192187
php-version:
193-
- "7.4"
188+
- "8.0"
194189

195190
steps:
196191
- name: "Checkout"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.4 || ^8.0",
14+
"php": ">=8.0",
1515
"nikic/php-parser": "^v4.13.1",
1616
"phpstan/phpstan": "^1.1.1"
1717
},

tests/TestAsset/UnusedVariableRule/fixture.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function foo($ref)
7474
$function2();
7575

7676
$_SESSION = ['var19' => 1];
77-
$GLOBALS = null;
77+
$GLOBALS['foo'] = 'bar';
7878
}
7979

8080
class Test

0 commit comments

Comments
 (0)