Skip to content

Commit

Permalink
Support Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia authored Mar 28, 2024
1 parent decdf37 commit fcaa902
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: "Autoformat"
name: Autoformat
on:
push:

jobs:
composer-normalize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- uses: shivammathur/setup-php@v2

- uses: ramsey/composer-install@v2
- uses: ramsey/composer-install@v3

- run: composer normalize

Expand All @@ -23,7 +23,7 @@ jobs:
prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand Down
69 changes: 43 additions & 26 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
- 8.0
- 8.1
- 8.2
- 8.3
laravel-version:
- 5.5.*
- 5.6.*
- 5.7.*
- 5.8.*
Expand All @@ -32,6 +34,7 @@ jobs:
- ^8
- ^9
- ^10
- ^11
exclude:
- php-version: 7.1
laravel-version: ^6
Expand All @@ -43,20 +46,30 @@ jobs:
laravel-version: ^9
- php-version: 7.1
laravel-version: ^10
- php-version: 7.1
laravel-version: ^11
- php-version: 7.2
laravel-version: ^8
- php-version: 7.2
laravel-version: ^9
- php-version: 7.2
laravel-version: ^10
- php-version: 7.2
laravel-version: ^11
- php-version: 7.3
laravel-version: ^9
- php-version: 7.3
laravel-version: ^10
- php-version: 7.3
laravel-version: ^11
- php-version: 7.4
laravel-version: ^9
- php-version: 7.4
laravel-version: ^10
- php-version: 7.4
laravel-version: ^11
- php-version: 8.0
laravel-version: 5.5.*
- php-version: 8.0
laravel-version: 5.6.*
- php-version: 8.0
Expand All @@ -69,6 +82,10 @@ jobs:
laravel-version: ^7
- php-version: 8.0
laravel-version: ^10
- php-version: 8.0
laravel-version: ^11
- php-version: 8.1
laravel-version: 5.5.*
- php-version: 8.1
laravel-version: 5.6.*
- php-version: 8.1
Expand All @@ -79,6 +96,10 @@ jobs:
laravel-version: ^6
- php-version: 8.1
laravel-version: ^7
- php-version: 8.1
laravel-version: ^11
- php-version: 8.2
laravel-version: 5.5.*
- php-version: 8.2
laravel-version: 5.6.*
- php-version: 8.2
Expand All @@ -89,54 +110,50 @@ jobs:
laravel-version: ^6
- php-version: 8.2
laravel-version: ^7
- php-version: 8.3
laravel-version: 5.5.*
- php-version: 8.3
laravel-version: 5.6.*
- php-version: 8.3
laravel-version: 5.7.*
- php-version: 8.3
laravel-version: 5.8.*
- php-version: 8.3
laravel-version: ^6
- php-version: 8.3
laravel-version: ^7

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }}
php-version: ${{ matrix.php-version }}

- uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}-

- run: composer require illuminate/support:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress

- run: vendor/bin/phpunit --colors=always
- if: matrix.laravel-version == ^11
run: vendor/bin/phpunit --coverage-filter=src
- if: matrix.laravel-version != ^11
run: vendor/bin/phpunit

coverage:
runs-on: ubuntu-20.04

strategy:
matrix:
php-version:
- 8.1
laravel-version:
- ^9

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
coverage: pcov
extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }}
php-version: ${{ matrix.php-version }}
php-version: 8.3

- uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.laravel-version }}-

- run: composer require illuminate/support:${{ matrix.laravel-version }} --no-interaction --prefer-dist --no-progress
- uses: ramsey/composer-install@v3

- run: vendor/bin/phpunit --coverage-clover=coverage.xml
- run: vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-filter=src

- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vendor
composer.lock
.DS_Store
.idea/
.phpunit.result.cache
composer.lock
vendor
11 changes: 4 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"homepage": "https://github.com/mll-lab/laravel-comment",
"require": {
"php": "^7.1 || ^8",
"illuminate/contracts": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6 || ^7 || ^8 || ^9 || ^10",
"illuminate/support": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6 || ^7 || ^8 || ^9 || ^10"
"illuminate/contracts": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11",
"illuminate/support": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6 || ^7 || ^8 || ^9 || ^10 || ^11"
},
"require-dev": {
"ergebnis/composer-normalize": "^2",
"fakerphp/faker": "^1.8",
"orchestra/testbench": "~3.5.0 || ~3.6.0 || ~3.7.0 || ~3.8.0 || ~3.9.0 || ^4 || ^5 || ^6 || ^7 || ^8",
"phpunit/phpunit": "^7.5 || ^8.4 || ^9 || ^10"
"orchestra/testbench": "~3.5.0 || ~3.6.0 || ~3.7.0 || ~3.8.0 || ~3.9.0 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9",
"phpunit/phpunit": "^7.5 || ^8.4 || ^9 || ^10 || ^11"
},
"autoload": {
"psr-4": {
Expand All @@ -45,9 +45,6 @@
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"laravel": {
"providers": [
"\\Actuallymab\\LaravelComment\\LaravelCommentServiceProvider"
Expand Down

0 comments on commit fcaa902

Please sign in to comment.