Skip to content

Commit

Permalink
Added laravel 8 support (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
korridor authored Sep 11, 2020
1 parent ad8e84d commit e4ba366
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
18 changes: 14 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ language: php

matrix:
include:
# Laravel 5.6.*
- php: 7.1
env: LARAVEL='5.6.*' TESTBENCH='3.6.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.2
env: LARAVEL='5.6.*' TESTBENCH='3.6.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.3
env: LARAVEL='5.6.*' TESTBENCH='3.6.*' COMPOSER_FLAGS='--prefer-stable'
# Laravel 5.7.*
- php: 7.1
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.2
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.3
env: LARAVEL='5.7.*' TESTBENCH='3.7.*' COMPOSER_FLAGS='--prefer-stable'
# Laravel 5.8.*
- php: 7.1
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.1
Expand All @@ -30,6 +33,7 @@ matrix:
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.3
env: LARAVEL='5.8.*' TESTBENCH='3.8.*' COMPOSER_FLAGS='--prefer-stable'
# Laravel 6.*
- php: 7.2
env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.2
Expand All @@ -38,6 +42,7 @@ matrix:
env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.3
env: LARAVEL='6.*' TESTBENCH='4.*' COMPOSER_FLAGS='--prefer-stable'
# Laravel 7.*
- php: 7.2
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.2
Expand All @@ -46,14 +51,19 @@ matrix:
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.3
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.3
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.3
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.4
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.4
env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable'
# Laravel 8.*
- php: 7.3
env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.3
env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable'
- php: 7.4
env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest'
- php: 7.4
env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable'
fast_finish: true

before_install:
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
],
"license": "MIT",
"require": {
"php": "^7.1|^7.2|^7.3|^7.4",
"illuminate/support": "^5.6|^5.7|^5.8|^6|^7",
"illuminate/database": "^5.6|^5.7|^5.8|^6|^7"
"php": "^7.1.0",
"illuminate/support": "^5.6|^6|^7|^8",
"illuminate/database": "^5.6|^6|^7|^8"
},
"require-dev": {
"orchestra/testbench": "^3.6|^3.7|^3.8|^4.0|^5.0",
"orchestra/testbench": "^3.6|^4.0|^5.0|^6.0",
"phpunit/phpunit": "^7.0|^8.0|^9.0",
"friendsofphp/php-cs-fixer": "^2.16",
"squizlabs/php_codesniffer": "^3.5"
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ php artisan vendor:publish --provider="Korridor\LaravelModelValidationRules\Mode

This package is tested for the following Laravel versions:

- 8.*
- 7.*
- 6.*
- 5.8.*
Expand Down
6 changes: 2 additions & 4 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use Illuminate\Container\Container;
use Illuminate\Database\Capsule\Manager;
use Illuminate\Database\Eloquent\Factory as EloquentFactory;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Events\Dispatcher;
use Illuminate\Foundation\Application;
use Korridor\LaravelModelValidationRules\ModelValidationServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;

Expand All @@ -17,12 +17,10 @@ public function setUp(): void
parent::setUp();

$this->setUpDatabase();

$this->app->make(EloquentFactory::class)->load(__DIR__.'/TestClasses/Factories');
}

/**
* @param \Illuminate\Foundation\Application $app
* @param Application $app
* @return array
*/
protected function getPackageProviders($app)
Expand Down

0 comments on commit e4ba366

Please sign in to comment.