Skip to content

Commit 52cc7f9

Browse files
committed
Adds/test compatibility with PHP 8.2.
1 parent 6ac80f0 commit 52cc7f9

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-22.04
1010
strategy:
1111
matrix:
12-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
12+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
1313
name: PHP ${{ matrix.php }}
1414
steps:
1515
- uses: actions/checkout@v3
@@ -32,7 +32,7 @@ jobs:
3232
# see https://github.com/shivammathur/setup-php
3333
- uses: shivammathur/setup-php@v2
3434
with:
35-
php-version: 7.1
35+
php-version: '7.1'
3636
coverage: none
3737
- run: composer update --no-progress --prefer-lowest
3838
- run: composer phpstan

.php-cs-fixer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010

1111
$config = new Config();
1212
return $config->setRules([
13+
'@PSR12' => true,
14+
'@PSR12:risky' => true,
1315
'@PhpCsFixer' => true,
1416
'@PhpCsFixer:risky' => true,
17+
'@PHP71Migration' => true,
18+
'@PHP71Migration:risky' => true,
1519
'array_syntax' => ['syntax' => 'short'],
1620
'php_unit_test_class_requires_covers' => false,
1721
'backtick_to_shell_exec' => true,

composer.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,14 @@
4747
}
4848
},
4949
"scripts": {
50-
"phpstan": "@php phpstan analyse -l max lib tests examples .php-cs-fixer.php",
50+
"phpstan": "@php phpstan analyse -l max -c phpstan.neon lib tests examples .php-cs-fixer.php",
5151
"php-cs-fixer": "@php php-cs-fixer fix --allow-risky=yes",
5252
"php-cs-fixer-dry-run": "@php php-cs-fixer fix --dry-run --allow-risky=yes",
53-
"phpunit": "@php phpunit"
53+
"phpunit": "@php phpunit",
54+
"test": [
55+
"@php-cs-fixer-dry-run",
56+
"@phpstan",
57+
"@phpunit"
58+
]
5459
}
5560
}

0 commit comments

Comments
 (0)