Skip to content

Commit

Permalink
Support Laravel 9 and bensampo/laravel-enum 5 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpoulter authored Feb 21, 2022
1 parent 5cd0e4b commit 3b1fe95
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,23 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 7.3, 7.4, 8.0 ]
laravel: [ 8.* ]
php: [ 7.3, 7.4, 8.0, 8.1 ]
laravel: [ "^8.0", "^9.0" ]
stability: [ prefer-lowest, prefer-stable ]
exclude:
- php: 7.3
laravel: "^9.0"
- php: 7.4
laravel: "^9.0"
- php: 8.1
laravel: "^8.0"
include:
- laravel: 8.*
testbench: 6.*
- laravel: "^8.0"
testbench: "^6.0"
enum: "^4.0"
- laravel: "^9.0"
testbench: "^7.0"
enum: "^5.0"

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

Expand Down Expand Up @@ -47,7 +58,7 @@ jobs:
- name: Install dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}"
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer require "illuminate/support:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "bensampo/laravel-enum:${{ matrix.enum }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
Expand Down
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
],
"require": {
"php": "^7.3|^8.0",
"bensampo/laravel-enum": "^3.1|^4.0",
"illuminate/support": "^8.0",
"bensampo/laravel-enum": "^3.1|^4.0|^5.0",
"illuminate/support": "^8.0|^9.0",
"laravel/nova": "^3.0"
},
"require-dev": {
"joshgaber/novaunit": "^2.2",
"mockery/mockery": "^1.3.3",
"nunomaduro/collision": "^5.2",
"orchestra/testbench": "^6.0",
"nunomaduro/collision": "^5.2|^6.1",
"orchestra/testbench": "^6.0|^7.0",
"phpunit/phpunit": "^9.3.3",
"symfony/var-dumper": "^5.0"
"symfony/var-dumper": "^5.0|^6.0"
},
"autoload": {
"psr-4": {
Expand All @@ -59,5 +59,6 @@
},
"config": {
"sort-packages": true
}
},
"minimum-stability": "dev"
}
3 changes: 0 additions & 3 deletions tests/Examples/FlaggedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

namespace SimpleSquid\Nova\Fields\Enum\Tests\Examples;

use BenSampo\Enum\Traits\CastsEnums;
use Illuminate\Database\Eloquent\Model;

class FlaggedModel extends Model
{
use CastsEnums;

public $table = 'example_models';

protected $guarded = [];
Expand Down
3 changes: 0 additions & 3 deletions tests/Examples/IntegerModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

namespace SimpleSquid\Nova\Fields\Enum\Tests\Examples;

use BenSampo\Enum\Traits\CastsEnums;
use Illuminate\Database\Eloquent\Model;

class IntegerModel extends Model
{
use CastsEnums;

public $table = 'example_models';

protected $guarded = [];
Expand Down
3 changes: 0 additions & 3 deletions tests/Examples/StringModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

namespace SimpleSquid\Nova\Fields\Enum\Tests\Examples;

use BenSampo\Enum\Traits\CastsEnums;
use Illuminate\Database\Eloquent\Model;

class StringModel extends Model
{
use CastsEnums;

public $table = 'example_models';

protected $guarded = [];
Expand Down

0 comments on commit 3b1fe95

Please sign in to comment.