From 0d37e297f2890e99d597de3ef6901f8c4a61d65a Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 15 Aug 2024 14:37:04 +1200 Subject: [PATCH] API Deprecate GraphQL --- code/GraphQL/LinkablePlugin.php | 11 +++++++++++ code/GraphQL/Resolver.php | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/code/GraphQL/LinkablePlugin.php b/code/GraphQL/LinkablePlugin.php index ff09f16a77..c0ad5f7f9f 100644 --- a/code/GraphQL/LinkablePlugin.php +++ b/code/GraphQL/LinkablePlugin.php @@ -14,11 +14,15 @@ use SilverStripe\GraphQL\Schema\Schema; use SilverStripe\ORM\ArrayList; use SilverStripe\ORM\DataList; +use SilverStripe\Dev\Deprecation; if (!interface_exists(ModelQueryPlugin::class)) { return; } +/** + * @deprecated 5.3.0 Will be removed without equivalent functionality to replace it + */ class LinkablePlugin implements ModelQueryPlugin { use Configurable; @@ -43,6 +47,13 @@ class LinkablePlugin implements ModelQueryPlugin */ private static $resolver = [__CLASS__, 'applyLinkFilter']; + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be removed without equivalent functionality to replace it', Deprecation::SCOPE_CLASS); + }); + } + /** * @return string */ diff --git a/code/GraphQL/Resolver.php b/code/GraphQL/Resolver.php index 0dac373afc..154d323f63 100644 --- a/code/GraphQL/Resolver.php +++ b/code/GraphQL/Resolver.php @@ -4,9 +4,20 @@ namespace SilverStripe\CMS\GraphQL; use SilverStripe\CMS\Model\SiteTree; +use SilverStripe\Dev\Deprecation; +/** + * @deprecated 5.3.0 Will be removed without equivalent functionality to replace it + */ class Resolver { + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be removed without equivalent functionality to replace it', Deprecation::SCOPE_CLASS); + }); + } + public static function resolveGetPageByLink($obj, array $args = []) { return SiteTree::get_by_link($args['link']);