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 Update deprecations #1384

Merged
merged 4 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 3 additions & 1 deletion _legacy/GraphQL/ReadOneLegacyResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\Admin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\ResolveInfo;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\GraphQL\OperationResolver;
Expand All @@ -17,7 +18,7 @@
/**
* Shim to make readOne work like GraphQL 4
*
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use _graphql directory functionality instead
*/
class ReadOneLegacyResolver implements OperationResolver
{
Expand All @@ -28,6 +29,7 @@ class ReadOneLegacyResolver implements OperationResolver

public function __construct(DataObject $dataObject)
{
Deprecation::notice('1.8.0', 'Use _graphql directory functionality instead', Deprecation::SCOPE_CLASS);
$this->dataObject = $dataObject;
}

Expand Down
6 changes: 3 additions & 3 deletions code/LeftAndMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class LeftAndMain extends Controller implements PermissionProvider
private static $tree_class = null;

/**
* @deprecated 5.0 use $help_links instead
* @deprecated 1.12.0 Use $help_links instead
*
* @config
* @var string
Expand Down Expand Up @@ -933,11 +933,11 @@ public function Link($action = null)
}

/**
* @deprecated 5.0
* @deprecated 1.12.0 Use menu_title() instead
*/
public static function menu_title_for_class($class)
{
Deprecation::notice('5.0', 'Use menu_title() instead');
Deprecation::notice('1.12.0', 'Use menu_title() instead');
return static::menu_title($class, false);
}

Expand Down
12 changes: 6 additions & 6 deletions code/ModelAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,12 @@ public function getExportFields()
}

/**
* @deprecated 4.3.0
* @deprecated 1.3.0 Use GridFieldFilterHeader instead
* @return \SilverStripe\ORM\Search\SearchContext
*/
public function getSearchContext()
{
Deprecation::notice('4.3', 'Will be removed in favor of GridFieldFilterHeader in 5.0');
Deprecation::notice('1.3.0', 'Use GridFieldFilterHeader instead');

$gridField = $this->getEditForm()->fields()
->fieldByName($this->sanitiseClassName($this->modelClass));
Expand All @@ -396,12 +396,12 @@ public function getSearchContext()
/**
* Gets a list of fields that have been searched
*
* @deprecated 4.3.0
* @deprecated 1.3.0 Use GridFieldFilterHeader instead
* @return ArrayList
*/
public function SearchSummary()
{
Deprecation::notice('4.3', 'Will be removed in favor of GridFieldFilterHeader in 5.0');
Deprecation::notice('1.3.0', 'Use GridFieldFilterHeader instead');

$context = $this->getSearchContext();

Expand All @@ -411,12 +411,12 @@ public function SearchSummary()
/**
* Returns the search form
*
* @deprecated 4.3.0
* @deprecated 1.3.0 Use GridFieldFilterHeader instead
* @return Form|bool
*/
public function SearchForm()
{
Deprecation::notice('4.3', 'Will be removed in favor of GridFieldFilterHeader in 5.0');
Deprecation::notice('1.3.0', 'Use GridFieldFilterHeader instead');

if (!$this->showSearchForm
|| (is_array($this->showSearchForm) && !in_array($this->modelClass, $this->showSearchForm ?? []))
Expand Down