Skip to content

Commit

Permalink
Support PHP 8.3 #56
Browse files Browse the repository at this point in the history
  • Loading branch information
afbora committed Sep 9, 2024
1 parent 32fb9e6 commit 101b9df
Show file tree
Hide file tree
Showing 4 changed files with 401 additions and 123 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
php: ["8.0", "8.1"]
php: ["8.1", "8.2", "8.3"]
env:
extensions: mbstring, pcov
ini: pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""

steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3

- name: Setup PHP cache environment
id: ext-cache
Expand All @@ -27,20 +27,20 @@ jobs:
key: php-v1

- name: Cache PHP extensions
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # pin@v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # pin@v3
with:
path: ${{ steps.ext-cache.outputs.dir }}
key: ${{ steps.ext-cache.outputs.key }}
restore-keys: ${{ steps.ext-cache.outputs.key }}

- name: Setup PHP environment
uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # pin@v2
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # pin@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: ${{ env.ini }}
coverage: pcov
tools: phpunit:9.5.13, psalm:4.11.2
tools: phpunit:10.5.5, psalm:5.20.0

- name: Setup problem matchers
run: |
Expand All @@ -52,7 +52,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # pin@v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # pin@v3
with:
path: ${{ steps.composerCache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -63,7 +63,7 @@ jobs:

- name: Cache analysis data
id: finishPrepare
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # pin@v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # pin@v3
with:
path: ~/.cache/psalm
key: backend-analysis-${{ matrix.php }}-v2
Expand Down Expand Up @@ -91,12 +91,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
php: "8.0"
php: "8.2"
extensions: mbstring

steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3

- name: Setup PHP cache environment
id: ext-cache
Expand All @@ -107,15 +107,15 @@ jobs:
key: php-v1

- name: Cache PHP extensions
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # pin@v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # pin@v3
with:
path: ${{ steps.ext-cache.outputs.dir }}
key: ${{ steps.ext-cache.outputs.key }}
restore-keys: ${{ steps.ext-cache.outputs.key }}

- name: Setup PHP environment
id: finishPrepare
uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # pin@v2
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # pin@v2
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
Expand All @@ -140,7 +140,7 @@ jobs:
- name: Cache dependencies
id: composerCache2
if: always() && steps.composerCache1.outcome == 'success'
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # pin@v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # pin@v3
with:
path: ${{ steps.composerCache1.outputs.dir }}
key: ${{ runner.os }}-composer-locked-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -171,17 +171,17 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3

- name: Setup PHP environment
uses: shivammathur/setup-php@3eda58347216592f618bb1dff277810b6698e4ca # pin@v2
uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # pin@v2
with:
coverage: none
tools: php-cs-fixer:3.8.0

- name: Cache analysis data
id: finishPrepare
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # pin@v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # pin@v3
with:
path: ~/.php-cs-fixer
key: coding-style
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Kirby Query Language",
"license": "MIT",
"type": "kirby-plugin",
"version": "2.1.0",
"version": "2.2.0",
"keywords": [
"kirby",
"cms",
Expand All @@ -30,8 +30,7 @@
"source": "https://github.com/getkirby/kql"
},
"require": {
"php": ">=8.0.0 <8.3.0",
"getkirby/cms": ">=3.8.2",
"getkirby/cms": "^3.10.0 || ^4.0 || ^5.0",
"getkirby/composer-installer": "^1.2.1"
},
"autoload": {
Expand Down
Loading

0 comments on commit 101b9df

Please sign in to comment.