Skip to content

Commit

Permalink
Support for Laravel 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyslik committed Feb 28, 2019
1 parent 8baee2b commit 7412be5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
- version=L5-5
- version=L5-6
- version=L5-7
- version=L5-8

matrix:
exclude:
Expand All @@ -35,6 +36,7 @@ install:
- if [[ $version = 'L5-5' ]]; then travis_retry composer require --dev --update-with-dependencies --no-suggest --no-interaction orchestra/testbench:"3.5.*" phpunit/phpunit:"^6.0"; fi
- if [[ $version = 'L5-6' ]]; then travis_retry composer require --dev --update-with-dependencies --no-suggest --no-interaction orchestra/testbench:"3.6.*" phpunit/phpunit:"^7.0"; fi
- if [[ $version = 'L5-7' ]]; then travis_retry composer require --dev --update-with-dependencies --no-suggest --no-interaction orchestra/testbench:"3.7.*" phpunit/phpunit:"^7.0"; fi
- if [[ $version = 'L5-8' ]]; then travis_retry composer require --dev --update-with-dependencies --no-suggest --no-interaction orchestra/testbench:"3.8.*" phpunit/phpunit:"^7.0"; fi

script: vendor/bin/phpunit

Expand All @@ -43,4 +45,5 @@ branches:
- master
- L5.5-6
- L5.5-7
- L5.8

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"require-dev": {
"phpunit/phpunit": "^6.0|^7.0",
"orchestra/testbench": "3.5.*|3.6.*|3.7.*"
"orchestra/testbench": "3.5.*|3.6.*|3.7.*|3.8.*"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/ColumnSortable/Sortable.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private function parseParameters(array $parameters)

/**
* @param \Illuminate\Database\Query\Builder $query
* @param $relation
* @param \Illuminate\Database\Eloquent\Relations\BelongsTo|\Illuminate\Database\Eloquent\Relations\HasOne $relation
*
* @return \Illuminate\Database\Query\Builder
*
Expand All @@ -157,7 +157,7 @@ private function queryJoinBuilder($query, $relation)
$parentPrimaryKey = $relation->getQualifiedParentKeyName();
} elseif ($relation instanceof BelongsTo) {
$relatedPrimaryKey = $relation->getQualifiedOwnerKeyName();
$parentPrimaryKey = $relation->getQualifiedForeignKey();
$parentPrimaryKey = $relation->getQualifiedForeignKeyName();
} else {
throw new \Exception();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ColumnSortableTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ColumnSortableTraitTest extends \Orchestra\Testbench\TestCase
/**
* Method setUp() runs before each test.
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
app()->register(\Kyslik\ColumnSortable\ColumnSortableServiceProvider::class);
Expand Down

0 comments on commit 7412be5

Please sign in to comment.