mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
API Remove deprcated code (#336)
This commit is contained in:
parent
d73868f8c0
commit
36639967ae
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Search\Captures;
|
|
||||||
|
|
||||||
use SilverStripe\Dev\Deprecation;
|
|
||||||
use SilverStripe\ORM\Connect\MySQLDatabase;
|
|
||||||
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated 3.1.0 Use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
|
||||||
*/
|
|
||||||
|
|
||||||
class SearchManipulateCapture_MySQLDatabase extends MySQLDatabase
|
|
||||||
{
|
|
||||||
|
|
||||||
public $isManipulationCapture = true;
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
Deprecation::notice('3.1.0', 'Use tractorcow/silverstripe-proxy-db to proxy the database connector instead', Deprecation::SCOPE_CLASS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function manipulate($manipulation)
|
|
||||||
{
|
|
||||||
$res = parent::manipulate($manipulation);
|
|
||||||
SearchUpdater::handle_manipulation($manipulation);
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Search\Captures;
|
|
||||||
|
|
||||||
use SilverStripe\Dev\Deprecation;
|
|
||||||
use SilverStripe\PostgreSQL\PostgreSQLDatabase;
|
|
||||||
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
|
||||||
|
|
||||||
if (!class_exists(PostgreSQLDatabase::class)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated 3.1.0 Use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
|
||||||
*/
|
|
||||||
class SearchManipulateCapture_PostgreSQLDatabase extends PostgreSQLDatabase
|
|
||||||
{
|
|
||||||
public $isManipulationCapture = true;
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
Deprecation::notice('3.1.0', 'Use tractorcow/silverstripe-proxy-db to proxy the database connector instead', Deprecation::SCOPE_CLASS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function manipulate($manipulation)
|
|
||||||
{
|
|
||||||
$res = parent::manipulate($manipulation);
|
|
||||||
SearchUpdater::handle_manipulation($manipulation);
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,33 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Search\Captures;
|
|
||||||
|
|
||||||
use SilverStripe\Dev\Deprecation;
|
|
||||||
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
|
||||||
use SilverStripe\SQLite\SQLite3Database;
|
|
||||||
|
|
||||||
if (!class_exists(SQLite3Database::class)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated 3.1.0 Use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
|
||||||
*/
|
|
||||||
|
|
||||||
class SearchManipulateCapture_SQLite3Database extends SQLite3Database
|
|
||||||
{
|
|
||||||
|
|
||||||
public $isManipulationCapture = true;
|
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
Deprecation::notice('3.1.0', 'Use tractorcow/silverstripe-proxy-db to proxy the database connector instead', Deprecation::SCOPE_CLASS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function manipulate($manipulation)
|
|
||||||
{
|
|
||||||
$res = parent::manipulate($manipulation);
|
|
||||||
SearchUpdater::handle_manipulation($manipulation);
|
|
||||||
return $res;
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Search\Queries;
|
namespace SilverStripe\FullTextSearch\Search\Queries;
|
||||||
|
|
||||||
use SilverStripe\Dev\Deprecation;
|
|
||||||
use SilverStripe\FullTextSearch\Search\Adapters\SearchAdapterInterface;
|
use SilverStripe\FullTextSearch\Search\Adapters\SearchAdapterInterface;
|
||||||
use SilverStripe\FullTextSearch\Search\Criteria\SearchCriteria;
|
use SilverStripe\FullTextSearch\Search\Criteria\SearchCriteria;
|
||||||
use SilverStripe\FullTextSearch\Search\Criteria\SearchCriteriaInterface;
|
use SilverStripe\FullTextSearch\Search\Criteria\SearchCriteriaInterface;
|
||||||
@ -282,86 +281,6 @@ class SearchQuery extends ViewableData
|
|||||||
return "Search Query\n";
|
return "Search Query\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
* @deprecated 4.0.0 Use addSearchTerm() instead
|
|
||||||
*/
|
|
||||||
public function search($text, $fields = null, $boost = [])
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use addSearchTerm() instead');
|
|
||||||
return $this->addSearchTerm($text, $fields, $boost);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
* @deprecated 4.0.0 Use addFuzzySearchTerm() instead
|
|
||||||
*/
|
|
||||||
public function fuzzysearch($text, $fields = null, $boost = [])
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use addFuzzySearchTerm() instead');
|
|
||||||
return $this->addFuzzySearchTerm($text, $fields, $boost);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
* @deprecated 4.0.0 Use addClassFilter() instead
|
|
||||||
*/
|
|
||||||
public function inClass($class, $includeSubclasses = true)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use addClassFilter() instead');
|
|
||||||
return $this->addClassFilter($class, $includeSubclasses);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
* @deprecated 4.0.0 Use addFilter() instead
|
|
||||||
*/
|
|
||||||
public function filter($field, $values)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use addFilter() instead');
|
|
||||||
return $this->addFilter($field, $values);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
* @deprecated 4.0.0 Use addExclude() instead
|
|
||||||
*/
|
|
||||||
public function exclude($field, $values)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use addExclude() instead');
|
|
||||||
return $this->addExclude($field, $values);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
* @deprecated 4.0.0 Use setStart() instead
|
|
||||||
*/
|
|
||||||
public function start($start)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use setStart() instead');
|
|
||||||
return $this->setStart($start);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
* @deprecated 4.0.0 Use setLimit() instead
|
|
||||||
*/
|
|
||||||
public function limit($limit)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use setLimit() instead');
|
|
||||||
return $this->setLimit($limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
* @deprecated 4.0.0 Use setPageSize() instead
|
|
||||||
*/
|
|
||||||
public function page($page)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use setPageSize() instead');
|
|
||||||
return $this->setPageSize($page);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return SearchCriteriaInterface[]
|
* @return SearchCriteriaInterface[]
|
||||||
*/
|
*/
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace SilverStripe\FullTextSearch\Search\Queries;
|
namespace SilverStripe\FullTextSearch\Search\Queries;
|
||||||
|
|
||||||
use SilverStripe\Core\Injector\Injectable;
|
use SilverStripe\Core\Injector\Injectable;
|
||||||
use SilverStripe\Dev\Deprecation;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create one of these and pass as one of the values in filter or exclude to filter or exclude by a (possibly
|
* Create one of these and pass as one of the values in filter or exclude to filter or exclude by a (possibly
|
||||||
@ -38,24 +37,4 @@ class SearchQuery_Range
|
|||||||
{
|
{
|
||||||
return $this->start !== null || $this->end !== null;
|
return $this->start !== null || $this->end !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated 4.0.0 Use setStart() instead
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
*/
|
|
||||||
public function start($start)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use setStart() instead');
|
|
||||||
return $this->setStart($start);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated 4.0.0 Use setEnd() instead
|
|
||||||
* @codeCoverageIgnore
|
|
||||||
*/
|
|
||||||
public function end($end)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.0.0', 'Use setEnd() instead');
|
|
||||||
return $this->setEnd($end);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user