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 as a result of refactoring #1851

Merged
Merged
Show file tree
Hide file tree
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
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, along with a few other of these where I noticed the version number was wrong

*/
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