From c0ecdd924c1026ab473272eaf658d3ed8af06af7 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 3 Nov 2019 12:45:46 +0800 Subject: [PATCH] Prepare 4.1.0 release. Signed-off-by: Mior Muhammad Zaki --- CHANGELOG-4.x.md | 8 ++++++++ composer.json | 2 +- tests/Table/GridTest.php | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG-4.x.md b/CHANGELOG-4.x.md index 611e1d8..ed6d8a1 100644 --- a/CHANGELOG-4.x.md +++ b/CHANGELOG-4.x.md @@ -2,6 +2,14 @@ This changelog references the relevant changes (bug and security fixes) done to `orchestra/html`. +## 4.1.0 + +Released: 2019-11-03 + +### Changes + +* Replace `Orchestra\Support\Concerns\QueryFilter` with `Laravie\QueryFilter\Orderable` and `Laravie\QueryFilter\Searchable`. + ## 4.0.0 Released: 2019-09-03 diff --git a/composer.json b/composer.json index 035e691..d276c07 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "php": ">=7.2", "illuminate/translation": "^6.0", "laravie/html": "^6.0", - "laravie/query-filter": "^1.0", + "laravie/query-filter": "^1.0.2", "orchestra/contracts": "^4.0", "orchestra/support": "^4.0" }, diff --git a/tests/Table/GridTest.php b/tests/Table/GridTest.php index 7705fe2..078f77b 100644 --- a/tests/Table/GridTest.php +++ b/tests/Table/GridTest.php @@ -386,7 +386,11 @@ public function testSearchableMethod() $model = m::mock('\Illuminate\Database\Query\Builder'); $model->shouldReceive('getConnection->getDriverName')->andReturn('mysql'); - $model->shouldReceive('orWhere')->twice()->with(m::type('Closure')) + $model->shouldReceive('where')->once()->with(m::type('Closure')) + ->andReturnUsing(static function ($c) use ($model) { + $c($model); + }) + ->shouldReceive('orWhere')->twice()->with(m::type('Closure')) ->andReturnUsing(static function ($c) use ($model) { $c($model); })