Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add support for php 8.4 #26

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ on:
jobs:
lint_test:
runs-on: ubuntu-20.04
strategy:
matrix:
php: ['8.2', '8.3', '8.4']
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
php-version: ${{ matrix.php }}
extensions: composer, xdebug

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
Expand All @@ -33,7 +36,7 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
key: ${{ runner.os }}-composer-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}

- name: Install dependencies
run: composer install --no-progress --no-interaction --prefer-dist
Expand All @@ -51,9 +54,4 @@ jobs:
run: composer run-script lint

- name: Test with coverage
run: composer run-script coverage

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: composer run-script test
30 changes: 30 additions & 0 deletions .github/workflows/sonar_scanner.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Run SonarCloud Scan

on:
push:
branches:
- main
pull_request:
branches:
- main
- develop
workflow_call:
workflow_dispatch:

Expand All @@ -12,6 +19,29 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: composer, xdebug

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

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

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

- name: Test with coverage
run: composer run-script coverage

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/test_backwards.yml

This file was deleted.

12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"phpdocumentor/reflection-docblock": "^5.4"
},
"require-dev": {
"phpunit/phpunit": "^11.0",
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "^3.59"
"phpunit/phpunit": "^11.5.1",
"phpstan/phpstan": "^1.12.10",
"friendsofphp/php-cs-fixer": "^3.65.0"
},
"autoload": {
"psr-4": {
Expand All @@ -46,9 +46,9 @@
},
"scripts": {
"demo": "php ./examples/demo-app/src/DemoApp.php",
"format-check": "php-cs-fixer check",
"format": "php-cs-fixer fix",
"lint": "phpstan analyze -l 9 src tests",
"format-check": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer check",
"format": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
"lint": "phpstan analyze -l 9 src tests --memory-limit 1G",
"test": "phpunit tests",
"coverage": "XDEBUG_MODE=coverage phpunit --coverage-clover=coverage.xml tests",
"coverage-report": "XDEBUG_MODE=coverage phpunit --coverage-html=coverage tests"
Expand Down
Loading
Loading