Skip to content

Commit c3f812e

Browse files
committed
Add Support for PHP 8.5
1 parent e7a126b commit c3f812e

17 files changed

Lines changed: 1115 additions & 802 deletions

.editorconfig

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,12 @@ charset = utf-8
1212
indent_style = space
1313
indent_size = 4
1414

15-
[*.{yml,yaml}]
16-
indent_size = 2
15+
[Makefile]
16+
indent_style = tab
17+
18+
[*.http]
19+
end_of_line = crlf
20+
21+
[*.{yml,yaml,json}]
22+
indent_size = 2
23+
max_line_length = unset

.env.dist

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
# GitHub Token to Increase API Rate Limit and Enable Composer Authentication
22
GITHUB_TOKEN=
3-
4-
# XDebug Mode (https://xdebug.org/docs/all_settings#mode)
5-
XDEBUG_MODE=develop,debug
6-
7-
# XDebug Configuration (https://xdebug.org/docs/all_settings#XDEBUG_CONFIG)
8-
XDEBUG_CONFIG="client_host=host.docker.internal start_with_request=trigger idekey=PHPSTORM output_dir=/var/www/build/xdebug"

.gitattributes

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
/.aiignore export-ignore
12
/.allowed-licenses export-ignore
3+
/.claude export-ignore
4+
/.cursor export-ignore
5+
/.dockerignore export-ignore
26
/.editorconfig export-ignore
37
/.env export-ignore
48
/.env.dist export-ignore
5-
/.env.example export-ignore
69
/.gitattributes export-ignore
7-
/.github/ export-ignore
10+
/.github export-ignore
811
/.gitignore export-ignore
912
/.idea export-ignore
13+
/.junie export-ignore
14+
/.prettierignore export-ignore
15+
/.psysh.php export-ignore
1016
/CHANGELOG.md export-ignore
1117
/CODE_OF_CONDUCT.md export-ignore
1218
/CONTRIBUTING.md export-ignore
@@ -16,22 +22,30 @@
1622
/benchmarks/ export-ignore
1723
/bin/ export-ignore
1824
/build/ export-ignore
25+
/caddy/ export-ignore
1926
/captainhook.json export-ignore
2027
/codecov.yml export-ignore
28+
/compose.yaml export-ignore
29+
/compose.yml export-ignore
2130
/composer.lock export-ignore
2231
/conventional-commits.json export-ignore
32+
/docker-compose.yaml export-ignore
2333
/docker-compose.yml export-ignore
2434
/docs/ export-ignore
35+
/php-development.ini export-ignore
36+
/php-production.ini export-ignore
2537
/phpbench.json export-ignore
2638
/phpcs.xml export-ignore
2739
/phpcs.xml.dist export-ignore
40+
/phpstan.dist.neon export-ignore
2841
/phpstan.neon export-ignore
29-
/phpstan.neon.dist export-ignore
42+
/phpunit.dist.xml export-ignore
3043
/phpunit.xml export-ignore
31-
/phpunit.xml.dist export-ignore
3244
/psalm-baseline.xml export-ignore
3345
/psalm.xml export-ignore
46+
/public/ export-ignore
3447
/rector.php export-ignore
3548
/resources/ export-ignore
3649
/settings.ini export-ignore
50+
/storage/ export-ignore
3751
/tests/ export-ignore
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: "Install PHP Dependencies"
2+
description: "Install PHP Dependencies"
3+
inputs:
4+
php-version:
5+
description: "PHP Version"
6+
required: false
7+
default: "8.5"
8+
display:
9+
description: "Vendor Script Name for Display, e.g. PHPUnit"
10+
required: false
11+
cache:
12+
description: "Vendor Script Cache Path, e.g. build/phpstan"
13+
required: false
14+
command:
15+
description: "Vendor Script Command, e.g. php vendor/bin/phpstan analyse --no-progress"
16+
required: false
17+
runs:
18+
using: "composite"
19+
steps:
20+
- name: Set Up Build Cache for Composer
21+
uses: actions/cache@v4
22+
with:
23+
path: build/composer
24+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}-${{ github.run_id }}
25+
restore-keys: |
26+
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
27+
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
28+
${{ runner.os }}-composer
29+
30+
- name: Set Up Vendor Cache for Composer
31+
uses: actions/cache@v4
32+
with:
33+
path: vendor
34+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}-${{ github.run_id }}
35+
restore-keys: |
36+
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
37+
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
38+
${{ runner.os }}-composer
39+
40+
- if: ${{ inputs.cache != '' }}
41+
name: Set Up Cache for ${{ inputs.name }}
42+
uses: actions/cache@v4
43+
with:
44+
path: ${{ inputs.cache }}
45+
key: ${{ runner.os }}-${{ inputs.php-version }}-${{ inputs.cache }}-${{ hashFiles('**/composer.lock') }}
46+
restore-keys: ${{ runner.os }}-${{ inputs.php-version }}-${{ inputs.cache }}
47+
48+
- name: Install Composer Dependencies
49+
shell: bash
50+
run: |
51+
mkdir -p build/composer
52+
docker run --rm \
53+
--user="$(id -u):$(id -g)" \
54+
--pull=missing \
55+
--env COMPOSER_CACHE_DIR="build/composer" \
56+
--volume ${{ github.workspace }}:/app \
57+
composer:latest \
58+
composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader
59+
60+
- if: ${{ inputs.cache != '' }}
61+
name: Make Command Cache Directory
62+
shell: bash
63+
run: mkdir -p ${{ inputs.cache }}
64+
65+
- if: ${{ inputs.command != '' }}
66+
name: Run ${{ inputs.display }}
67+
shell: bash
68+
run: |
69+
docker run --rm \
70+
--user="$(id -u):$(id -g)" \
71+
--pull=missing \
72+
--volume ${{ github.workspace }}:/app \
73+
php:${{ inputs.php-version }}-cli-alpine \
74+
${{ inputs.command != '' }}

.github/workflows/ci.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
composer:
10+
name: Composer Validation Check and Security Audit
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v6
15+
- uses: ./.github/actions/ci-php-command-action
16+
with:
17+
display: Composer
18+
command: composer validate && composer audit
19+
20+
phpcs:
21+
name: PHP_CodeSniffer Code Style Check
22+
needs: composer
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout Code
26+
uses: actions/checkout@v6
27+
- uses: ./.github/actions/ci-php-command-action
28+
with:
29+
display: PHP_CodeSniffer
30+
cache: build/phpcs
31+
command: php vendor/bin/phpcs --parallel=$(nproc --ignore=2) --report=full
32+
33+
phpstan:
34+
name: PHPStan Static Analysis Check
35+
needs: composer
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout Code
39+
uses: actions/checkout@v6
40+
- uses: ./.github/actions/ci-php-command-action
41+
with:
42+
display: PHPStan
43+
cache: build/phpstan
44+
command: php vendor/bin/phpstan analyze --memory-limit=-1 --verbose --no-progress --no-interaction --no-ansi
45+
46+
rector:
47+
name: Rector Coding Standards Check
48+
needs: composer
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout Code
52+
uses: actions/checkout@v6
53+
- uses: ./.github/actions/ci-php-command-action
54+
with:
55+
display: Rector
56+
cache: build/rector
57+
command: php vendor/bin/rector process --dry-run --no-progress-bar --no-ansi
58+
59+
linter:
60+
name: PHP Syntax Linting - ${{ matrix.php }}
61+
needs: composer
62+
strategy:
63+
matrix:
64+
php: ['8.2', '8.3', '8.4', '8.5' ]
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: Checkout Code
68+
uses: actions/checkout@v6
69+
- uses: ./.github/actions/ci-php-command-action
70+
with:
71+
php-version: ${{ matrix.php }}
72+
display: PHPUnit
73+
cache: build/.phpunit.cache
74+
command: php vendor/bin/parallel-lint -j $(nproc --ignore=2) --show-deprecated --exclude vendor --exclude build .
75+
76+
phpunit:
77+
name: PHPUnit Unit Tests - ${{ matrix.php }}
78+
needs: composer
79+
strategy:
80+
matrix:
81+
php: ['8.2', '8.3', '8.4', '8.5' ]
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: Checkout Code
85+
uses: actions/checkout@v6
86+
- uses: ./.github/actions/ci-php-command-action
87+
with:
88+
php-version: ${{ matrix.php }}
89+
display: PHPUnit
90+
cache: build/.phpunit.cache
91+
command: php vendor/bin/phpunit --no-progress

.github/workflows/code_quality.yaml

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)