mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Merge pull request #332 from creative-commoners/pulls/3/depr-messages
API Update deprecations
This commit is contained in:
commit
11ec50e03a
@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Search\Captures;
|
namespace SilverStripe\FullTextSearch\Search\Captures;
|
||||||
|
|
||||||
|
use SilverStripe\Dev\Deprecation;
|
||||||
use SilverStripe\ORM\Connect\MySQLDatabase;
|
use SilverStripe\ORM\Connect\MySQLDatabase;
|
||||||
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 3.1...4.0 Please use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
* @deprecated 3.1.0 Use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SearchManipulateCapture_MySQLDatabase extends MySQLDatabase
|
class SearchManipulateCapture_MySQLDatabase extends MySQLDatabase
|
||||||
@ -14,6 +15,11 @@ class SearchManipulateCapture_MySQLDatabase extends MySQLDatabase
|
|||||||
|
|
||||||
public $isManipulationCapture = true;
|
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)
|
public function manipulate($manipulation)
|
||||||
{
|
{
|
||||||
$res = parent::manipulate($manipulation);
|
$res = parent::manipulate($manipulation);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Search\Captures;
|
namespace SilverStripe\FullTextSearch\Search\Captures;
|
||||||
|
|
||||||
|
use SilverStripe\Dev\Deprecation;
|
||||||
use SilverStripe\PostgreSQL\PostgreSQLDatabase;
|
use SilverStripe\PostgreSQL\PostgreSQLDatabase;
|
||||||
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
||||||
|
|
||||||
@ -10,13 +11,17 @@ if (!class_exists(PostgreSQLDatabase::class)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 3.1...4.0 Please use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
* @deprecated 3.1.0 Use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SearchManipulateCapture_PostgreSQLDatabase extends PostgreSQLDatabase
|
class SearchManipulateCapture_PostgreSQLDatabase extends PostgreSQLDatabase
|
||||||
{
|
{
|
||||||
public $isManipulationCapture = true;
|
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)
|
public function manipulate($manipulation)
|
||||||
{
|
{
|
||||||
$res = parent::manipulate($manipulation);
|
$res = parent::manipulate($manipulation);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace SilverStripe\FullTextSearch\Search\Captures;
|
namespace SilverStripe\FullTextSearch\Search\Captures;
|
||||||
|
|
||||||
|
use SilverStripe\Dev\Deprecation;
|
||||||
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
||||||
use SilverStripe\SQLite\SQLite3Database;
|
use SilverStripe\SQLite\SQLite3Database;
|
||||||
|
|
||||||
@ -10,7 +11,7 @@ if (!class_exists(SQLite3Database::class)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 3.1...4.0 Please use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
* @deprecated 3.1.0 Use tractorcow/silverstripe-proxy-db to proxy the database connector instead
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SearchManipulateCapture_SQLite3Database extends SQLite3Database
|
class SearchManipulateCapture_SQLite3Database extends SQLite3Database
|
||||||
@ -18,6 +19,11 @@ class SearchManipulateCapture_SQLite3Database extends SQLite3Database
|
|||||||
|
|
||||||
public $isManipulationCapture = true;
|
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)
|
public function manipulate($manipulation)
|
||||||
{
|
{
|
||||||
$res = parent::manipulate($manipulation);
|
$res = parent::manipulate($manipulation);
|
||||||
|
@ -284,81 +284,81 @@ class SearchQuery extends ViewableData
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use addSearchTerm() instead
|
||||||
*/
|
*/
|
||||||
public function search($text, $fields = null, $boost = [])
|
public function search($text, $fields = null, $boost = [])
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use addSearchTerm() instead');
|
Deprecation::notice('4.0.0', 'Use addSearchTerm() instead');
|
||||||
return $this->addSearchTerm($text, $fields, $boost);
|
return $this->addSearchTerm($text, $fields, $boost);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use addFuzzySearchTerm() instead
|
||||||
*/
|
*/
|
||||||
public function fuzzysearch($text, $fields = null, $boost = [])
|
public function fuzzysearch($text, $fields = null, $boost = [])
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use addFuzzySearchTerm() instead');
|
Deprecation::notice('4.0.0', 'Use addFuzzySearchTerm() instead');
|
||||||
return $this->addFuzzySearchTerm($text, $fields, $boost);
|
return $this->addFuzzySearchTerm($text, $fields, $boost);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use addClassFilter() instead
|
||||||
*/
|
*/
|
||||||
public function inClass($class, $includeSubclasses = true)
|
public function inClass($class, $includeSubclasses = true)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use addClassFilter() instead');
|
Deprecation::notice('4.0.0', 'Use addClassFilter() instead');
|
||||||
return $this->addClassFilter($class, $includeSubclasses);
|
return $this->addClassFilter($class, $includeSubclasses);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use addFilter() instead
|
||||||
*/
|
*/
|
||||||
public function filter($field, $values)
|
public function filter($field, $values)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use addFilter() instead');
|
Deprecation::notice('4.0.0', 'Use addFilter() instead');
|
||||||
return $this->addFilter($field, $values);
|
return $this->addFilter($field, $values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use addExclude() instead
|
||||||
*/
|
*/
|
||||||
public function exclude($field, $values)
|
public function exclude($field, $values)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use addExclude() instead');
|
Deprecation::notice('4.0.0', 'Use addExclude() instead');
|
||||||
return $this->addExclude($field, $values);
|
return $this->addExclude($field, $values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use setStart() instead
|
||||||
*/
|
*/
|
||||||
public function start($start)
|
public function start($start)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use setStart() instead');
|
Deprecation::notice('4.0.0', 'Use setStart() instead');
|
||||||
return $this->setStart($start);
|
return $this->setStart($start);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use setLimit() instead
|
||||||
*/
|
*/
|
||||||
public function limit($limit)
|
public function limit($limit)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use setLimit() instead');
|
Deprecation::notice('4.0.0', 'Use setLimit() instead');
|
||||||
return $this->setLimit($limit);
|
return $this->setLimit($limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use setPageSize() instead
|
||||||
*/
|
*/
|
||||||
public function page($page)
|
public function page($page)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use setPageSize() instead');
|
Deprecation::notice('4.0.0', 'Use setPageSize() instead');
|
||||||
return $this->setPageSize($page);
|
return $this->setPageSize($page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,22 +40,22 @@ class SearchQuery_Range
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use setStart() instead
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function start($start)
|
public function start($start)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use setStart() instead');
|
Deprecation::notice('4.0.0', 'Use setStart() instead');
|
||||||
return $this->setStart($start);
|
return $this->setStart($start);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated 4.0.0 Use setEnd() instead
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function end($end)
|
public function end($end)
|
||||||
{
|
{
|
||||||
Deprecation::notice('4.0', 'Use setEnd() instead');
|
Deprecation::notice('4.0.0', 'Use setEnd() instead');
|
||||||
return $this->setEnd($end);
|
return $this->setEnd($end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user