ENH Update deprecation messages

This commit is contained in:
Steve Boyd 2022-10-12 16:19:27 +13:00
parent 9f541b9a04
commit 7b87926428
9 changed files with 14 additions and 14 deletions

View File

@ -378,7 +378,7 @@ abstract class BaseKernel implements Kernel
* The purpose of this method is to avoid loading PHPUnit test files with incompatible definitions.
*
* @return string[] List of CI types to ignore as defined by `Module`.
* @deprecated 5.0.0
* @deprecated 5.0.0 Will be removed without equivalent functionality
*/
protected function getIgnoredCIConfigs(): array
{

View File

@ -145,7 +145,7 @@ class ClassLoader
*/
public function classExists($class)
{
Deprecation::notice('4.0', 'Use ClassInfo::exists.');
Deprecation::notice('4.0', 'Use ClassInfo::exists instead');
return ClassInfo::exists($class);
}
}

View File

@ -17,7 +17,7 @@ use Exception;
*
* @internal This class is designed specifically for use pre-startup and may change without warning
*
* @deprecated 5.0 To be removed in SilverStripe 5.0
* @deprecated 5.0 Will be removed without equivalent functionality
*/
class ErrorControlChain
{

View File

@ -15,7 +15,7 @@ use SilverStripe\Security\Security;
*
* @internal This class is experimental API and may change without warning
*
* @deprecated 5.0 To be removed in SilverStripe 5.0
* @deprecated 5.0 Will be removed without equivalent functionality
*/
class ErrorDirector extends Director
{

View File

@ -176,7 +176,7 @@ class CsvBulkLoader extends BulkLoader
*/
protected function splitFile($path, $lines = null)
{
Deprecation::notice('5.0', 'splitFile is deprecated, please process files using a stream');
Deprecation::notice('5.0', 'Process files using a stream instead');
if (!is_int($lines)) {
$lines = $this->config()->get("lines");
@ -232,7 +232,7 @@ class CsvBulkLoader extends BulkLoader
*/
protected function getNewSplitFileName()
{
Deprecation::notice('5.0', 'getNewSplitFileName is deprecated, please name your files yourself');
Deprecation::notice('5.0', 'Name files yourself instead');
return TEMP_PATH . DIRECTORY_SEPARATOR . uniqid(str_replace('\\', '_', static::class) ?? '', true) . '.csv';
}
@ -244,7 +244,7 @@ class CsvBulkLoader extends BulkLoader
*/
protected function processChunk($filepath, $preview = false)
{
Deprecation::notice('5.0', 'processChunk is deprecated, please process rows individually');
Deprecation::notice('5.0', 'Process rows individually instead');
$results = BulkLoader_Result::create();
$csv = new CSVParser(

View File

@ -441,7 +441,7 @@ class GridFieldFilterHeader extends AbstractGridFieldComponent implements GridFi
*/
public function getLegacyFilterHeader(GridField $gridField)
{
Deprecation::notice('5.0', 'Table row based filter header will be removed in favor of search field in 5.0');
Deprecation::notice('5.0', 'Use search field instead');
$list = $gridField->getList();
if (!$this->checkDataType($list)) {

View File

@ -1269,7 +1269,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
*/
public function doValidate()
{
Deprecation::notice('5.0', 'Use validate');
Deprecation::notice('5.0', 'Use validate() instead');
return $this->validate();
}

View File

@ -721,7 +721,7 @@ class Group extends DataObject
* Code needs to be unique as it is used to identify a specific group. Ensure no duplicate
* codes are created.
*
* @deprecated 5.0 Replaced with a validation error when a duplicate is found.
* @todo Replace with a validation error when a duplicate is found.
*/
private function dedupeCode(): void
{

View File

@ -448,7 +448,7 @@ class Member extends DataObject
}
/**
* @deprecated 5.0.0 Use Security::setCurrentUser() or IdentityStore::logIn()
* @deprecated 5.0.0 Use Security::setCurrentUser() or IdentityStore::logIn() instead
*
*/
public function logIn()
@ -509,7 +509,7 @@ class Member extends DataObject
* has a database record of the same ID. If there is
* no logged in user, FALSE is returned anyway.
*
* @deprecated Not needed anymore, as it returns Security::getCurrentUser();
* @deprecated Use Security::getCurrentUser() instead
*
* @return boolean TRUE record found FALSE no record found
*/
@ -770,7 +770,7 @@ class Member extends DataObject
/**
* Returns the current logged in user
*
* @deprecated 5.0.0 use Security::getCurrentUser()
* @deprecated 5.0.0 Use Security::getCurrentUser() instead
*
* @return Member
*/
@ -820,7 +820,7 @@ class Member extends DataObject
/**
* Get the ID of the current logged in user
*
* @deprecated 5.0.0 use Security::getCurrentUser()
* @deprecated 5.0.0 Use Security::getCurrentUser() instead
*
* @return int Returns the ID of the current logged in user or 0.
*/