API Update deprecations

This commit is contained in:
Steve Boyd 2022-11-16 11:36:25 +13:00
parent 59d60e6edc
commit 47d13600f9
5 changed files with 41 additions and 24 deletions

View File

@ -2,11 +2,12 @@
namespace SilverStripe\FullTextSearch\Search\Captures;
use SilverStripe\Dev\Deprecation;
use SilverStripe\ORM\Connect\MySQLDatabase;
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
@ -14,6 +15,11 @@ 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);

View File

@ -2,6 +2,7 @@
namespace SilverStripe\FullTextSearch\Search\Captures;
use SilverStripe\Dev\Deprecation;
use SilverStripe\PostgreSQL\PostgreSQLDatabase;
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
{
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);

View File

@ -2,6 +2,7 @@
namespace SilverStripe\FullTextSearch\Search\Captures;
use SilverStripe\Dev\Deprecation;
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
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
@ -18,6 +19,11 @@ 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);

View File

@ -284,81 +284,81 @@ class SearchQuery extends ViewableData
/**
* @codeCoverageIgnore
* @deprecated
* @deprecated 4.0.0 Use addSearchTerm() instead
*/
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);
}
/**
* @codeCoverageIgnore
* @deprecated
* @deprecated 4.0.0 Use addFuzzySearchTerm() instead
*/
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);
}
/**
* @codeCoverageIgnore
* @deprecated
* @deprecated 4.0.0 Use addClassFilter() instead
*/
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);
}
/**
* @codeCoverageIgnore
* @deprecated
* @deprecated 4.0.0 Use addFilter() instead
*/
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);
}
/**
* @codeCoverageIgnore
* @deprecated
* @deprecated 4.0.0 Use addExclude() instead
*/
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);
}
/**
* @codeCoverageIgnore
* @deprecated
* @deprecated 4.0.0 Use setStart() instead
*/
public function start($start)
{
Deprecation::notice('4.0', 'Use setStart() instead');
Deprecation::notice('4.0.0', 'Use setStart() instead');
return $this->setStart($start);
}
/**
* @codeCoverageIgnore
* @deprecated
* @deprecated 4.0.0 Use setLimit() instead
*/
public function limit($limit)
{
Deprecation::notice('4.0', 'Use setLimit() instead');
Deprecation::notice('4.0.0', 'Use setLimit() instead');
return $this->setLimit($limit);
}
/**
* @codeCoverageIgnore
* @deprecated
* @deprecated 4.0.0 Use setPageSize() instead
*/
public function page($page)
{
Deprecation::notice('4.0', 'Use setPageSize() instead');
Deprecation::notice('4.0.0', 'Use setPageSize() instead');
return $this->setPageSize($page);
}

View File

@ -40,22 +40,22 @@ class SearchQuery_Range
}
/**
* @deprecated
* @deprecated 4.0.0 Use setStart() instead
* @codeCoverageIgnore
*/
public function start($start)
{
Deprecation::notice('4.0', 'Use setStart() instead');
Deprecation::notice('4.0.0', 'Use setStart() instead');
return $this->setStart($start);
}
/**
* @deprecated
* @deprecated 4.0.0 Use setEnd() instead
* @codeCoverageIgnore
*/
public function end($end)
{
Deprecation::notice('4.0', 'Use setEnd() instead');
Deprecation::notice('4.0.0', 'Use setEnd() instead');
return $this->setEnd($end);
}
}