Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate API that will be removed #94

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading