diff --git a/.travis.yml b/.travis.yml index fba457d..023ebdf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,10 +14,9 @@ env: matrix: include: - - php: 7.0 - - php: 7.0 - env: RELEASE=lowest - php: 7.1 + - php: 7.1 + env: RELEASE=lowest - php: 7.2 - php: 7.3 env: COVERAGE=yes diff --git a/README.md b/README.md index cc97c60..227817b 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,9 @@ DB::table('users')->insertIgnore( ### Eloquent -You can use UPSERT and INSERT IGNORE queries in Eloquent with the `HasUpsertQueries` trait: +You can use UPSERT and INSERT IGNORE queries with Eloquent models. + +In Laravel 5.5–5.7, this requires the `HasUpsertQueries` trait: ```php class User extends Model @@ -134,4 +136,6 @@ If you are using Lumen, you have to instantiate the query builder manually: $builder = new \Staudenmeir\LaravelUpsert\Query\Builder(app('db')->connection()); $builder->from(...)->upsert(...); -``` \ No newline at end of file +``` + +In Eloquent, the `HasUpsertQueries` trait is required for *all* versions of Lumen. \ No newline at end of file diff --git a/composer.json b/composer.json index 515c371..a2ebffe 100644 --- a/composer.json +++ b/composer.json @@ -9,12 +9,12 @@ } ], "require": { - "php": ">=7.0", - "illuminate/database": "5.5.*|5.6.*|5.7.*" + "php": "^7.1.3", + "illuminate/database": "5.8.*" }, "require-dev": { - "laravel/homestead": "^7.0", - "orchestra/testbench": "^3.5" + "laravel/homestead": "^8.0", + "orchestra/testbench": "3.8.*" }, "autoload": { "psr-4": { diff --git a/tests/TestCase.php b/tests/TestCase.php index 8b6f4ed..c594290 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -12,7 +12,7 @@ abstract class TestCase extends Base { - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -48,7 +48,7 @@ protected function setUp() Carbon::setTestNow(Carbon::now()->addSecond()); } - protected function tearDown() + protected function tearDown(): void { Carbon::setTestNow(null);