Skip to content

Commit

Permalink
Merge branch '5' into 6
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 17, 2024
2 parents a20513d + 76f8044 commit b7af2d2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Dev/Build.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 = [
Expand All @@ -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
Expand Down
16 changes: 16 additions & 0 deletions src/Dev/DevelopmentAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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();
Expand Down
13 changes: 13 additions & 0 deletions src/Extensions/DevBuildExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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')) {
Expand Down

0 comments on commit b7af2d2

Please sign in to comment.