Skip to content

Commit

Permalink
API Deprecate API that will be removed as a result of refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Nov 14, 2024
1 parent e30e7ac commit 4f1a77a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/CMSProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CMSProfileController extends LeftAndMain
private static $required_permission_codes = 'CMS_ACCESS';

/**
* @deprecated 5.4.0 Will be renamed to model_class
* @deprecated 2.4.0 Will be renamed to model_class
*/
private static $tree_class = Member::class;

Expand Down
9 changes: 8 additions & 1 deletion code/LeftAndMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Manifest\ModuleResourceLoader;
use SilverStripe\Core\Manifest\VersionProvider;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
Expand Down Expand Up @@ -128,7 +129,7 @@ class LeftAndMain extends Controller implements PermissionProvider
*
* @config
* @var string
* @deprecated 5.4.0 Will be renamed to model_class
* @deprecated 2.4.0 Will be renamed to model_class
*/
private static $tree_class = null;

Expand Down Expand Up @@ -485,8 +486,12 @@ public function jsonError($errorCode, $errorMessage = null)
throw new HTTPResponse_Exception($response);
}

/**
* @deprecated 2.4.0 Will be replaced with SilverStripe\Admin\FormSchemaController::schema()
*/
public function methodSchema(HTTPRequest $request): HTTPResponse
{
Deprecation::noticeWithNoReplacment('2.4.0', 'Will be replaced with SilverStripe\Admin\FormSchemaController::schema()');
$method = $request->param('Method');
$formName = $request->param('FormName');
$itemID = $request->param('ItemID');
Expand Down Expand Up @@ -1564,9 +1569,11 @@ public function EmptyForm()
* Handler for all global modals
*
* @return ModalController
* @deprecated 2.4.0 Will be removed without equivalent functionality to replace it
*/
public function Modals()
{
Deprecation::noticeWithNoReplacment('2.4.0');
return ModalController::create($this, "Modals");
}

Expand Down
6 changes: 6 additions & 0 deletions code/ModalController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use SilverStripe\Admin\Forms\EditorExternalLinkFormFactory;
use SilverStripe\Control\Controller;
use SilverStripe\Control\RequestHandler;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Forms\Form;

/**
Expand All @@ -30,6 +31,7 @@ public function Link($action = null)

/**
* @var Controller
* @deprecated 2.4.0 Will be removed without equivalent functionality to replace it
*/
protected $controller;

Expand All @@ -53,19 +55,23 @@ public function getRequest()

/**
* @return Controller
* @deprecated 2.4.0 Will be removed without equivalent functionality to replace it
*/
public function getController()
{
Deprecation::noticeWithNoReplacment('2.4.0');
return $this->controller;
}

/**
* Get urlsegment
*
* @return string
* @deprecated 2.4.0 Will be removed without equivalent functionality to replace it
*/
public function getName()
{
Deprecation::noticeWithNoReplacment('2.4.0');
return $this->name;
}

Expand Down
2 changes: 1 addition & 1 deletion code/SecurityAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class SecurityAdmin extends ModelAdmin implements PermissionProvider
private static $menu_priority = 0;

/**
* @deprecated 5.4.0 Will be renamed to model_class
* @deprecated 2.4.0 Will be renamed to model_class
*/
private static $tree_class = Group::class;

Expand Down

0 comments on commit 4f1a77a

Please sign in to comment.