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

Add php 8.1 and laravel 9 support #10

Merged
merged 3 commits into from
Feb 16, 2022
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
15 changes: 14 additions & 1 deletion .github/workflows/run-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,20 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1

- name: Get Composer cache cirectory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache Composer packages
uses: actions/cache@v2
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-interaction --no-suggest
Expand Down
31 changes: 26 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,31 @@ name: run-tests
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.0, 7.4 ]
laravel: [ 8.* ]
dependency-version: [ prefer-lowest, prefer-stable ]
php: [7.4, 8.0, 8.1]
laravel: [8.*, 9.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: 6.*
- laravel: 9.*
testbench: 7.*
exclude:
- php: 8.1
laravel: 8.*
dependency-version: prefer-lowest
- php: 8.0
laravel: 8.*
dependency-version: prefer-lowest
- php: 7.4
laravel: 9.*

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }}

steps:
Expand All @@ -37,9 +44,23 @@ jobs:
coverage: xdebug
extensions: yaml

- name: Get Composer cache cirectory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"

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

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
4 changes: 2 additions & 2 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer;

$rules = [
'@PSR2' => true,
Expand Down Expand Up @@ -195,7 +195,7 @@

return (new Config())
->registerCustomFixers([
new ForceFQCNFixer()
new ForceFQCNFixer(),
])
->setRules($rules)
->setFinder($finder);
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
}
],
"require": {
"php": "^7.4|^8.0",
"php": "^7.4|^8.0|^8.1",
"ext-json": "*",
"laravel/framework": "^8.0"
"laravel/framework": "^8.0|^9.0"
},
"suggest": {
"ext-yaml": "*"
},
"require-dev": {
"adamwojs/php-cs-fixer-phpdoc-force-fqcn": "^2.0",
"friendsofphp/php-cs-fixer": "^3.0",
"orchestra/testbench": "^6.0",
"orchestra/testbench": "^6.0|^7.0",
"phpunit/phpunit": "^9.1",
"squizlabs/php_codesniffer": "^3.6"
},
Expand Down