ENH Update deprecation messages

This commit is contained in:
Steve Boyd 2022-10-13 14:48:40 +13:00
parent e6aa183eb4
commit 33b6a00f49
5 changed files with 10 additions and 6 deletions

View File

@ -533,8 +533,7 @@ class Controller extends RequestHandler implements TemplateGlobalProvider
* called before Controller::init(). That is, you must call it in your controller's init method * called before Controller::init(). That is, you must call it in your controller's init method
* before it calls parent::init(). * before it calls parent::init().
* *
* @deprecated 4.1.0:5.0.0 Add this controller's url to * @deprecated 4.1.0:5.0.0 Add this controller's url to SilverStripe\Security\BasicAuthMiddleware.URLPatterns injected property instead
* SilverStripe\Security\BasicAuthMiddleware.URLPatterns injected property instead of setting false
*/ */
public function disableBasicAuth() public function disableBasicAuth()
{ {

View File

@ -2,11 +2,18 @@
namespace SilverStripe\Control\Email; namespace SilverStripe\Control\Email;
use SilverStripe\Dev\Deprecation;
/** /**
* @deprecated 4.12.0 Will be replaced with symfony/mailer * @deprecated 4.12.0 Will be replaced with symfony/mailer
*/ */
class SwiftPlugin implements \Swift_Events_SendListener class SwiftPlugin implements \Swift_Events_SendListener
{ {
public function __construct()
{
Deprecation::notice('4.12.0', 'Will be replaced with symfony/mailer', Deprecation::SCOPE_CLASS);
}
/** /**
* Before sending a message make sure all our overrides are taken into account * Before sending a message make sure all our overrides are taken into account
* *

View File

@ -66,7 +66,7 @@ if (class_exists(IsEqualCanonicalizing::class)) {
/** /**
* Set this to true on your sub-class to use the draft site by default for every test in this class. * Set this to true on your sub-class to use the draft site by default for every test in this class.
* *
* @deprecated 4.2.0 Use ?stage=Stage in your ->get() querystring requests instead * @deprecated 4.2.0 Use ?stage=Stage in your request's querystring instead
* @var bool * @var bool
*/ */
protected static $use_draft_site = false; protected static $use_draft_site = false;

View File

@ -38,7 +38,7 @@ class DBClassName extends DBEnum
*/ */
public static function clear_classname_cache() public static function clear_classname_cache()
{ {
Deprecation::notice('4.3', 'Call DBEnum::flushCache() instead'); Deprecation::notice('4.3', 'Use DBEnum::flushCache() instead');
DBEnum::flushCache(); DBEnum::flushCache();
} }

View File

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