Skip to content

Commit

Permalink
Add comparability with Solarium v3.5
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tarleb committed Feb 15, 2016
1 parent fb23949 commit 7ada799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SolrDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -170,4 +170,4 @@ public function setSort($value)
}
}
}
}
}

0 comments on commit 7ada799

Please sign in to comment.