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 Deprecate API that will be removed #60

Merged
Merged
Changes from all 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
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
Loading