Skip to content

Commit

Permalink
Merge pull request #37 from Ticketpark/php83
Browse files Browse the repository at this point in the history
Add support for PHP 8.3
  • Loading branch information
sprain authored Nov 23, 2023
2 parents b3f8308 + d5dd4f1 commit 42ac32f
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 44 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: tests

on:
push:
pull_request:

jobs:
tests:
runs-on: ubuntu-20.04

strategy:
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
stability: ['prefer-lowest', 'prefer-stable']

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, gd
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose


code_checks:
runs-on: ubuntu-20.04
name: Static code analysis

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: dom, curl, libxml, mbstring, zip, bcmath, gd
tools: composer
coverage: none

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Check composer files
run: composer validate --strict

- name: Check coding standard
run: vendor/bin/php-cs-fixer --no-interaction --dry-run --diff -v fix lib/
43 changes: 0 additions & 43 deletions .github/workflows/tests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{"name": "Manuel Reinhard", "email": "manu@sprain.ch"}
],
"require": {
"php": "^8.0.0|^8.1.0|^8.2.0",
"php": "^8.0.0|^8.1.0|^8.2.0|^8.2.0",
"ext-json": "*",
"ext-dom": "*",
"ext-intl": "*",
Expand Down

0 comments on commit 42ac32f

Please sign in to comment.