Skip to content

Commit 5feba3b

Browse files
committed
chore: support php 8.4
This commit also switches over from vimeo/psalm to phpstan/phpstan for static code analysis.
1 parent a4e6f15 commit 5feba3b

39 files changed

+1857
-2051
lines changed

.github/workflows/run-tests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
os: [ubuntu-latest]
12-
php: ['8.2', '8.3']
12+
php: ['8.2', '8.3', '8.4']
1313
dependency-version: [prefer-lowest, prefer-stable]
1414

1515
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v4
2020

2121
- name: Install Puppeteer
22-
run: npm install puppeteer
22+
run: npm install -G puppeteer
2323

2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
@@ -36,7 +36,7 @@ jobs:
3636
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3737

3838
- name: "Cache dependencies installed with composer"
39-
uses: "actions/cache@v3"
39+
uses: "actions/cache@v4"
4040
with:
4141
path: "${{ steps.determine-composer-cache-directory.outputs.dir }}"
4242
key: "php-${{ matrix.php }}-composer-${{ matrix.dependency-version }}-${{ hashFiles('composer.lock') }}"
@@ -45,8 +45,8 @@ jobs:
4545
- name: Install dependencies
4646
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
4747

48-
- name: Run psalm
49-
run: composer analyze -- --php-version=${{ matrix.php }}
48+
- name: Run phpstan
49+
run: composer analyze
5050

5151
- name: Start server
5252
run: (php -S localhost:8000 -t ./tests/Server &) || /bin/true

.phpactor.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "/phpactor.schema.json",
3+
"language_server_phpstan.enabled": false,
4+
"language_server_php_cs_fixer.enabled": false
5+
}

composer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": "~8.2.0 || ~8.3.0",
13+
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
1414
"guzzlehttp/guzzle": "^7.8.0",
1515
"jakeasmith/http_build_url": "^1.0.1",
1616
"league/container": "^4.2",
@@ -27,15 +27,15 @@
2727
"symfony/options-resolver": "^7.0"
2828
},
2929
"require-dev": {
30-
"ergebnis/composer-normalize": "^2.39",
31-
"ergebnis/php-cs-fixer-config": "^6.11.0",
30+
"ergebnis/composer-normalize": "^2.45",
31+
"ergebnis/php-cs-fixer-config": "^6.45.0",
3232
"http-interop/http-factory-guzzle": "^1.2",
33+
"phpstan/phpstan": "^2.1",
3334
"phpunit/phpunit": "^10.4.2",
3435
"psr/http-message": "^1.1.0",
3536
"roave/security-advisories": "dev-latest",
3637
"slim/slim": "^4.12",
37-
"spatie/browsershot": "^3.60.0",
38-
"vimeo/psalm": "^5.16"
38+
"spatie/browsershot": "^5.0"
3939
},
4040
"suggest": {
4141
"spatie/browsershot": "Required to execute Javascript in spiders"
@@ -67,7 +67,7 @@
6767
"composer normalize"
6868
],
6969
"analyze": [
70-
"vendor/bin/psalm --no-cache"
70+
"vendor/bin/phpstan"
7171
],
7272
"coding-standards": [
7373
"mkdir -p .build/php-cs-fixer",

0 commit comments

Comments
 (0)