From 8e65c1a0ce5dfb6cecafbc2a4cee6d342a8f2620 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 10 Sep 2024 15:16:02 +1200 Subject: [PATCH] API Deprecate API that will be removed --- src/Controllers/CronTaskController.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Controllers/CronTaskController.php b/src/Controllers/CronTaskController.php index 6127482..d68a3f5 100644 --- a/src/Controllers/CronTaskController.php +++ b/src/Controllers/CronTaskController.php @@ -13,6 +13,7 @@ use SilverStripe\Core\Injector\Injector; use SilverStripe\CronTask\CronTaskStatus; use SilverStripe\CronTask\Interfaces\CronTask; +use SilverStripe\Dev\Deprecation; use SilverStripe\ORM\FieldType\DBDatetime; use SilverStripe\Security\Permission; use SilverStripe\Security\Security; @@ -22,6 +23,7 @@ * * The default route to this controller is 'dev/cron' * + * @deprecated 3.1.0 Will be replaced with SilverStripe\CronTask\Cli\CronTaskCommand */ class CronTaskController extends Controller { @@ -32,6 +34,18 @@ class CronTaskController extends Controller */ protected $verbosity = 1; + public function __construct() + { + parent::__construct(); + Deprecation::withNoReplacement(function () { + Deprecation::notice( + '3.1.0', + 'Will be replaced with SilverStripe\CronTask\Cli\CronTaskCommand', + Deprecation::SCOPE_CLASS + ); + }); + } + /** * Tell the controller how noisy it may be *