From 46c6b268f1ac06cdc8e6e078b8c215d7ff94706a Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:18:38 +1200 Subject: [PATCH] API Deprecate API that will be removed (#60) --- src/Clear.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Clear.php b/src/Clear.php index 8562117..219b9e6 100644 --- a/src/Clear.php +++ b/src/Clear.php @@ -5,10 +5,14 @@ use SilverStripe\Control\Controller; use SilverStripe\Control\HTTPRequest; use SilverStripe\Core\Injector\Injector; +use SilverStripe\Dev\Deprecation; use SilverStripe\GraphQL\Schema\Storage\CodeGenerationStore; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Finder\Finder; +/** + * @deprecated 1.1.0 Will be replaced with SilverStripe\GraphQLDevTools\SchemaClear + */ class Clear extends Controller { private static $url_handlers = [ @@ -19,6 +23,18 @@ class Clear extends Controller 'clear', ]; + public function __construct() + { + parent::__construct(); + Deprecation::withNoReplacement(function () { + Deprecation::notice( + '1.1.0', + 'Will be replaced with SilverStripe\GraphQLDevTools\SchemaClear', + Deprecation::SCOPE_CLASS + ); + }); + } + public function clear(HTTPRequest $request): void { $logger = Injector::inst()->get(LoggerInterface::class . '.graphql-build');