Skip to content

Commit

Permalink
API Deprecate API that will be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 10, 2024
1 parent 7a02eed commit 8e65c1a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Controllers/CronTaskController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
{
Expand All @@ -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
*
Expand Down

0 comments on commit 8e65c1a

Please sign in to comment.