diff --git a/src/Dev/Build.php b/src/Dev/Build.php index 97eb2b07..ed382c7b 100644 --- a/src/Dev/Build.php +++ b/src/Dev/Build.php @@ -9,6 +9,7 @@ use SilverStripe\Control\HTTPRequest; use SilverStripe\Core\Injector\Injector; use SilverStripe\Dev\DebugView; +use SilverStripe\Dev\Deprecation; use SilverStripe\GraphQL\Schema\DataObject\FieldAccessor; use SilverStripe\GraphQL\Schema\Exception\EmptySchemaException; use SilverStripe\GraphQL\Schema\Exception\SchemaBuilderException; @@ -19,6 +20,9 @@ use SilverStripe\GraphQL\Schema\Storage\CodeGenerationStore; use SilverStripe\ORM\Connect\NullDatabaseException; +/** + * @deprecated 5.3.0 Will be replaced with SilverStripe\GraphQL\Dev\SchemaBuild + */ class Build extends Controller { private static $url_handlers = [ @@ -29,6 +33,18 @@ class Build extends Controller 'build' ]; + public function __construct() + { + parent::__construct(); + Deprecation::withNoReplacement(function () { + Deprecation::notice( + '5.4.0', + 'Will be replaced with SilverStripe\GraphQL\Dev\SchemaBuild', + Deprecation::SCOPE_CLASS + ); + }); + } + /** * @throws SchemaBuilderException * @throws SchemaNotFoundException diff --git a/src/Dev/DevelopmentAdmin.php b/src/Dev/DevelopmentAdmin.php index d1e29cc0..f2def245 100644 --- a/src/Dev/DevelopmentAdmin.php +++ b/src/Dev/DevelopmentAdmin.php @@ -15,8 +15,12 @@ use Exception; use Psr\Log\LoggerInterface; use SilverStripe\Core\Injector\Injector; +use SilverStripe\Dev\Deprecation; use SilverStripe\GraphQL\Schema\Logger; +/** + * @deprecated 5.3.0 Will be removed without equivalent functionality to replace it + */ class DevelopmentAdmin extends Controller implements PermissionProvider { private static $allowed_actions = [ @@ -34,6 +38,18 @@ class DevelopmentAdmin extends Controller implements PermissionProvider 'CAN_DEV_GRAPHQL', ]; + public function __construct() + { + parent::__construct(); + Deprecation::withNoReplacement(function () { + Deprecation::notice( + '5.4.0', + 'Will be removed without equivalent functionality to replace it', + Deprecation::SCOPE_CLASS + ); + }); + } + protected function init() { parent::init(); diff --git a/src/Extensions/DevBuildExtension.php b/src/Extensions/DevBuildExtension.php index acc6ae07..251f4732 100644 --- a/src/Extensions/DevBuildExtension.php +++ b/src/Extensions/DevBuildExtension.php @@ -6,6 +6,7 @@ use Psr\Log\LoggerInterface; use SilverStripe\Core\Config\Configurable; use SilverStripe\Core\Injector\Injector; +use SilverStripe\Dev\Deprecation; use SilverStripe\GraphQL\Dev\Build; use SilverStripe\GraphQL\Schema\Logger; use SilverStripe\ORM\DatabaseAdmin; @@ -23,6 +24,18 @@ class DevBuildExtension extends Extension */ private static bool $enabled = true; + public function __construct() + { + parent::__construct(); + Deprecation::withNoReplacement(function () { + Deprecation::notice( + '5.4.0', + 'Will be replaced with SilverStripe\GraphQL\Extensions\DbBuildExtension', + Deprecation::SCOPE_CLASS + ); + }); + } + protected function onAfterBuild(): void { if (!static::config()->get('enabled')) {