Skip to content

Commit 02772af

Browse files
authored
feat: php 8.3 support
* feat: Add PHP 8.3 to composer.json chore: coding-standards chore: bump ergebnis/php-cs-fixer-config to 6.11.0 fix: PHP-CS-Fixer ruleset creation chore: bump other packages * chore: remove unused reference * fix: Psalm errors * Apply php-cs-fixer changes * fix: IntegrationTestCase unlink tmp file on setUp fix: Workflow actions to use latest versions * Apply php-cs-fixer changes * fix: disable PhpCsFixerCustomFixers/phpdoc_array_style breaking psalm check * chore: include nyholm/psr7 and nyholm/psr7-server to resolve RuntimeException for PSR-17 ResponseFactory implementations * fix: PHP-CS-Fixer and Psalm --------- Co-authored-by: sweptsquash <[email protected]>
1 parent 34e38b9 commit 02772af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1182
-939
lines changed

.github/workflows/commitlint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
commitlint:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v3
8+
- uses: actions/checkout@v4
99
with:
1010
fetch-depth: 0
1111
- uses: wagoid/commitlint-github-action@v5

.github/workflows/fix-style.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
steps:
1010
- name: Get branch names
1111
id: branch-name
12-
uses: tj-actions/branch-names@v5.1
12+
uses: tj-actions/branch-names@v7
1313

1414
- name: Checkout code
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616
with:
1717
ref: ${{ github.head_ref }}
1818

@@ -28,6 +28,6 @@ jobs:
2828
run: ./vendor/bin/php-cs-fixer fix --allow-risky=yes --using-cache=no
2929

3030
- name: Commit style fixes
31-
uses: stefanzweifel/git-auto-commit-action@v4
31+
uses: stefanzweifel/git-auto-commit-action@v5
3232
with:
3333
commit_message: Apply php-cs-fixer changes

.github/workflows/run-tests.yml

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

1515
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Install Puppeteer
2222
run: npm install puppeteer
@@ -33,12 +33,12 @@ jobs:
3333

3434
- name: "Determine composer cache directory"
3535
id: "determine-composer-cache-directory"
36-
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
36+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3737

3838
- name: "Cache dependencies installed with composer"
3939
uses: "actions/cache@v3"
4040
with:
41-
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
41+
path: "${{ steps.determine-composer-cache-directory.outputs.dir }}"
4242
key: "php-${{ matrix.php }}-composer-${{ matrix.dependency-version }}-${{ hashFiles('composer.lock') }}"
4343
restore-keys: "php-${{ matrix.php }}-composer-${{ matrix.dependency-version }}-"
4444

.php-cs-fixer.php

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
use Ergebnis\PhpCsFixer\Config;
4-
use PhpCsFixer\RuleSet\RuleSet;
54

65
$header = <<<EOF
76
Copyright (c) 2023 Kai Sassnowski
@@ -12,20 +11,24 @@
1211
@see https://github.com/roach-php/roach
1312
EOF;
1413

15-
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php80($header), [
16-
'php_unit_test_class_requires_covers' => false,
17-
'class_attributes_separation' => [
18-
'elements' => [
19-
'const' => 'one',
20-
'method' => 'one',
21-
'property' => 'one',
22-
'trait_import' => 'none',
14+
$ruleSet = Config\RuleSet\Php80::create()
15+
->withHeader($header)
16+
->withRules(Config\Rules::fromArray([
17+
'php_unit_test_class_requires_covers' => false,
18+
'class_attributes_separation' => [
19+
'elements' => [
20+
'const' => 'one',
21+
'method' => 'one',
22+
'property' => 'one',
23+
'trait_import' => 'none',
24+
],
2325
],
24-
],
25-
'error_suppression' => [
26-
'noise_remaining_usages' => false,
27-
],
28-
]);
26+
'error_suppression' => [
27+
'noise_remaining_usages' => false,
28+
],
29+
]));
30+
31+
$config = Config\Factory::fromRuleSet($ruleSet);
2932

3033
$config->getFinder()->in(__DIR__);
3134
$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php-cs-fixer.cache');

composer.json

+20-18
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,32 @@
1010
}
1111
],
1212
"require": {
13-
"php": "~8.1.0 || ~8.2.0",
14-
"guzzlehttp/guzzle": "^7.4.5",
13+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
14+
"guzzlehttp/guzzle": "^7.8.0",
1515
"jakeasmith/http_build_url": "^1.0.1",
1616
"league/container": "^4.2",
17-
"monolog/monolog": "^3.1",
18-
"psr/container": "^2.0",
19-
"psy/psysh": "^0.11.12",
20-
"spatie/robots-txt": "^2.0",
21-
"symfony/console": "^6.0",
22-
"symfony/css-selector": "^6.0",
23-
"symfony/dom-crawler": "^6.0",
24-
"symfony/event-dispatcher": "^6.0",
25-
"symfony/options-resolver": "^6.0"
17+
"monolog/monolog": "^3.5",
18+
"nyholm/psr7": "^1.8.1",
19+
"nyholm/psr7-server": "^1.1",
20+
"psr/container": "^2.0.2",
21+
"psy/psysh": "^0.11.22",
22+
"spatie/robots-txt": "^2.0.3",
23+
"symfony/console": "^6.3.8",
24+
"symfony/css-selector": "^6.3.2",
25+
"symfony/dom-crawler": "^6.3.4",
26+
"symfony/event-dispatcher": "^6.3.2",
27+
"symfony/options-resolver": "^6.3"
2628
},
2729
"require-dev": {
28-
"ergebnis/composer-normalize": "^2.15",
29-
"ergebnis/php-cs-fixer-config": "^5.3",
30+
"ergebnis/composer-normalize": "^2.39",
31+
"ergebnis/php-cs-fixer-config": "^6.11.0",
3032
"http-interop/http-factory-guzzle": "^1.2",
31-
"phpunit/phpunit": "^10.0",
32-
"psr/http-message": "^1.0.1",
33+
"phpunit/phpunit": "^10.4.2",
34+
"psr/http-message": "^1.1.0",
3335
"roave/security-advisories": "dev-latest",
34-
"slim/slim": "^4.8",
35-
"spatie/browsershot": "^3.57.4",
36-
"vimeo/psalm": "^5.6"
36+
"slim/slim": "^4.12",
37+
"spatie/browsershot": "^3.60.0",
38+
"vimeo/psalm": "^5.16"
3739
},
3840
"suggest": {
3941
"spatie/browsershot": "Required to execute Javascript in spiders"

0 commit comments

Comments
 (0)