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');