Skip to content

Commit

Permalink
Support Laravel 6
Browse files Browse the repository at this point in the history
  • Loading branch information
pmatseykanets committed Sep 16, 2019
1 parent 104fa78 commit 87e69d8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor
composer.lock
.phpunit.result.cache
composer.lock
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 7.1
- 7.2
- 7.3

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
}
],
"require": {
"php": ">=7.0",
"illuminate/contracts": "~5.4",
"illuminate/database": "~5.4",
"illuminate/support": "~5.4",
"php": "^7.2",
"illuminate/contracts": "~5.4|~6.0",
"illuminate/database": "~5.4|~6.0",
"illuminate/support": "~5.4|~6.0",
"laravel/scout": "~7.0"
},
"require-dev": {
"phpunit/phpunit": "~6.0",
"mockery/mockery": "~1.0"
"phpunit/phpunit": "^8.3",
"mockery/mockery": "^1.2.3"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 4 additions & 3 deletions src/PostgresEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace ScoutEngines\Postgres;

use Laravel\Scout\Builder;
use Illuminate\Support\Arr;
use Laravel\Scout\Engines\Engine;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
Expand Down Expand Up @@ -200,7 +201,7 @@ public function getTotalCount($results)
return 0;
}

return (int) array_first($results)
return (int) Arr::first($results)
->total_count;
}

Expand Down Expand Up @@ -497,7 +498,7 @@ protected function option(Model $model, $key, $default = null)

$options = $model->searchableOptions() ?: [];

return array_get($options, $key, $default);
return Arr::get($options, $key, $default);
}

/**
Expand All @@ -509,7 +510,7 @@ protected function option(Model $model, $key, $default = null)
*/
protected function config($key, $default = null)
{
return array_get($this->config, $key, $default);
return Arr::get($this->config, $key, $default);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

abstract class TestCase extends BaseTestCase
{
public function tearDown()
public function tearDown(): void
{
// Prevent PHPUnit complaining about risky tests
// because Mockery expectations are not counted towards assertions
Expand Down

0 comments on commit 87e69d8

Please sign in to comment.