Skip to content

Commit

Permalink
add Laravel 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed Mar 13, 2024
1 parent f43d773 commit 6cf415c
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 46 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,29 @@ jobs:
name: PHPStan

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

- name: Setup PHP
- name: 🏗 Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
coverage: none
tools: phpstan

- name: Get composer cache directory
- 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
- name: 🏗 Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: phpstan-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: phpstan-composer-

- name: Install dependencies
- name: 📦 Install dependencies
run: composer install --no-interaction --no-suggest

- name: Run analysis
- name: 🧪 Analyse code
run: phpstan analyse
9 changes: 5 additions & 4 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ jobs:
name: Laravel Pint

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

- name: Setup PHP
- name: 🏗 Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
coverage: none
tools: laravel/pint

- name: Run analysis
- name: 🧪 Analyse code
run: pint
21 changes: 12 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 🏗 Checkout code
uses: actions/checkout@v4

- name: Get latest release info
id: get-release-info
uses: release-flow/keep-a-changelog-action/get-release-info@v1
- name: 🏗 Get release info
id: query-release-info
uses: release-flow/keep-a-changelog-action@v3
with:
release-version: latest
command: query
version: latest

- name: Publish to Github releases
uses: softprops/action-gh-release@v1
- name: 🚀 Publish to Github releases
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.get-release-info.outputs.release-notes }}
body: ${{ steps.query-release-info.outputs.release-notes }}
make_latest: ${{ $GITHUB_REF_NAME == 'main' && true || false }}
# prerelease: true
# files: '*.vsix'
# files: '*.vsix'
40 changes: 21 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,54 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.1, 8.2 ]
laravel: [ 9.*, 10.* ]
dependency-version: [ prefer-stable ]
php: [ 8.1, 8.2, 8.3 ]
stability: [prefer-lowest, prefer-stable]
laravel: [ 9.*, 10.*, 11.* ]
include:
- laravel: 9.*
testbench: 7.*

- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
- laravel: 11.*
testbench: 9.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

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

- name: Setup PHP
- name: 🏗 Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, exif
coverage: pcov

- name: Get composer cache directory
- 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
- name: 🏗 Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}-
key: dependencies-composer-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.lock') }}
restore-keys: dependencies-composer-laravel-${{ matrix.laravel }}-

- name: Install dependencies
- 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
composer update --prefer-dist --no-interaction --no-progress --${{ matrix.stability }}
- name: Execute tests
- name: 🧪 Execute tests
run: vendor/bin/phpunit -c phpunit.coverage.dist.xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: 🚀 Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./clover.xml
fail_ci_if_error: true
verbose: true
# verbose: true
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.1.0] - 2024-03-13

### Added

- Laravel 11 support

## [2.0.4] - 2023-09-18

### Fixed
Expand Down
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@
}
],
"require": {
"php": "^8.1|^8.2",
"illuminate/database": "^9.0|^10.0"
"php": "^8.1",
"illuminate/database": "^9.0 || ^10.0 || ^11.0"
},
"require-dev": {
"larastan/larastan": "^2.0",
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^9.0|^10.0",
"orchestra/testbench": "^7.0|^8.0"
"phpunit/phpunit": "^9.0 || ^10.0"
},
"minimum-stability": "stable",
"prefer-stable": true,
"autoload": {
"psr-4": {
"OpenSoutheners\\LaravelModelStatus\\": "src"
Expand All @@ -40,6 +42,5 @@
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev"
}
}

0 comments on commit 6cf415c

Please sign in to comment.