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 1/4] 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'); From 8ad509237199d978698a060e7626b91af4c9a7d1 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Fri, 6 Sep 2024 17:31:16 +1200 Subject: [PATCH 2/4] DEP Use PHPUnit 11 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f05c893..9acaa51 100644 --- a/composer.json +++ b/composer.json @@ -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" }, From 1c521e5b0e9107186c6cb4306855fea05f10299a Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 19 Sep 2024 14:06:21 +1200 Subject: [PATCH 3/4] ENH Don't use deprecated method (#62) --- src/Clear.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Clear.php b/src/Clear.php index 219b9e6..7a4bf33 100644 --- a/src/Clear.php +++ b/src/Clear.php @@ -26,7 +26,7 @@ class Clear extends Controller public function __construct() { parent::__construct(); - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedNotice(function () { Deprecation::notice( '1.1.0', 'Will be replaced with SilverStripe\GraphQLDevTools\SchemaClear', From e33789402f951f40e2ca47a1e1552bc8fcedf054 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 23 Sep 2024 15:15:34 +1200 Subject: [PATCH 4/4] DEP Increase minimum version of silverstripe/framework --- src/Clear.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Clear.php b/src/Clear.php index 7a4bf33..2004431 100644 --- a/src/Clear.php +++ b/src/Clear.php @@ -26,6 +26,11 @@ class Clear extends Controller 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',