Skip to content

Commit

Permalink
Merge branch '1' into 2
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 26, 2024
2 parents 5897c5a + ffcc66b commit 1549ab4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"symfony/filesystem": "^4 || ^5 || ^6 || ^7"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^11.3",
"silverstripe/framework": "^4.10",
"squizlabs/php_codesniffer": "^3"
},
Expand Down
21 changes: 21 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,23 @@ class Clear extends Controller
'clear',
];

public function __construct()
{
parent::__construct();
if (!method_exists(Deprecation::class, 'withSuppressedNotice')
|| !method_exists(Deprecation::class, 'notice')
) {
return;
}
Deprecation::withSuppressedNotice(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 1549ab4

Please sign in to comment.