From 7ada799833ebb98dbf9df889910c2902ef517fb5 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 15 Feb 2016 18:48:57 +0100 Subject: [PATCH] Add comparability with Solarium v3.5 The class layout was refactored in Solarium v3.5, the `Solarium\Core\Query\Query` was deprecated and replaced with a stub. Classes of type `Solarium\QueryType\Select\Query\Query` are used instead. This breaks tests for the type of `query`. Since both of the aforementioned classes implement `QueryInterface`, testing for instances of that interface fixes the bug while maintaining backward comparability. --- SolrDataProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SolrDataProvider.php b/SolrDataProvider.php index 07aefcf..e0de638 100644 --- a/SolrDataProvider.php +++ b/SolrDataProvider.php @@ -7,7 +7,7 @@ use yii\base\InvalidConfigException; use yii\data\BaseDataProvider; use yii\di\Instance; -use Solarium\Core\Query\Query as SolrQuery; +use Solarium\Core\Query\QueryInterface as SolrQuery; use sammaye\solr\Client; /** @@ -170,4 +170,4 @@ public function setSort($value) } } } -} \ No newline at end of file +}