Skip to content

Commit

Permalink
API Deprecate API that will be removed (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Sep 13, 2024
1 parent 5897c5a commit 46c6b26
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Clear.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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');
Expand Down

0 comments on commit 46c6b26

Please sign in to comment.