Skip to content

Commit

Permalink
Merge pull request #52 from laravel-shift/l11-compatibility
Browse files Browse the repository at this point in the history
Laravel 11.x Compatibility
  • Loading branch information
JustSteveKing authored Apr 20, 2024
2 parents 1d8158e + 191be83 commit 98f45d8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,25 @@ on:
jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
php: [8.0, 8.1]
laravel: [9.*, 10.*]
php: [8.0, 8.1, '8.2']
laravel: ['9.*', '10.*', '11.*']
dependency-version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1

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

Expand All @@ -27,21 +35,22 @@ jobs:
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xml, pcov, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv
ini-values: post_max_size=256M
tools: pecl
coverage: none
php-version: ${{ matrix.php }}
extensions: xml, pcov, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv
ini-values: post_max_size=256M
tools: pecl
coverage: none

- 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 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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"require": {
"php": "~7.2|^8.0",
"guzzlehttp/guzzle": "^6.3|^7.0",
"illuminate/support": "~5.8|^6.0|^7.0|^8.0|^9.0|^10.0"
"illuminate/support": "~5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0"
},
"require-dev": {
"phpunit/phpunit": ">=7.0",
"orchestra/testbench": "^4.0|^8.0",
"orchestra/testbench": "^4.0|^8.0|^9.0",
"squizlabs/php_codesniffer": "^3.0"
},
"autoload": {
Expand Down

0 comments on commit 98f45d8

Please sign in to comment.