Skip to content

Commit

Permalink
Merge branch '2' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 19, 2024
2 parents 7eb915d + 0a1cde3 commit 97107b0
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 0 deletions.
11 changes: 11 additions & 0 deletions code/GraphQL/FileFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@
use SilverStripe\Forms\DateField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\Filterable;
use SilverStripe\Dev\Deprecation;

/**
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class FileFilter
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}

/**
* Caution: Does NOT enforce canView permissions
*
Expand Down
7 changes: 7 additions & 0 deletions code/GraphQL/Notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;

/**
* Represents a notice related to a graphql Action. This could be a failure,
* warning, or recoverable query (e.g. "are you sure you want to publish this item?")
*
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class Notice
{
Expand Down Expand Up @@ -34,6 +38,9 @@ class Notice
*/
public function __construct($message, $noticeType, $ids = [])
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
$this->message = $message;
$this->noticeType = $noticeType;
$this->ids = $ids;
Expand Down
10 changes: 10 additions & 0 deletions code/GraphQL/Resolvers/AssetAdminResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@
use SilverStripe\Versioned\Versioned;
use InvalidArgumentException;

/**
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class AssetAdminResolver
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}

public static function resolveFileInterfaceType($object)
{
if ($object instanceof Folder) {
Expand Down
11 changes: 11 additions & 0 deletions code/GraphQL/Resolvers/FieldResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@

use GraphQL\Type\Definition\ResolveInfo;
use SilverStripe\GraphQL\Schema\DataObject\FieldAccessor;
use SilverStripe\Dev\Deprecation;

/**
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class FieldResolver
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}

public static function resolve($obj, array $args, array $context, ResolveInfo $info)
{
$field = $info->fieldName;
Expand Down
11 changes: 11 additions & 0 deletions code/GraphQL/Resolvers/FileTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,22 @@
use SilverStripe\Assets\Folder;
use SilverStripe\Assets\Storage\AssetContainer;
use SilverStripe\Core\Injector\Injectable;
use SilverStripe\Dev\Deprecation;

/**
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class FileTypeResolver
{
use Injectable;

public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}

private static $dependencies = [
'ThumbnailGenerator' => '%$SilverStripe\AssetAdmin\Model\ThumbnailGenerator.graphql'
];
Expand Down
11 changes: 11 additions & 0 deletions code/GraphQL/Resolvers/FolderTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,20 @@
use Exception;
use Closure;
use SilverStripe\ORM\DataQuery;
use SilverStripe\Dev\Deprecation;

/**
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class FolderTypeResolver
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}

/**
* @param Folder $object
* @param array $args
Expand Down
11 changes: 11 additions & 0 deletions code/GraphQL/Resolvers/PublicationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,23 @@
use SilverStripe\Versioned\RecursivePublishable;
use SilverStripe\Versioned\Versioned;
use InvalidArgumentException;
use SilverStripe\Dev\Deprecation;

/**
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class PublicationResolver
{
const ACTION_PUBLISH = 'publish';
const ACTION_UNPUBLISH = 'unpublish';

public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}

public static function resolvePublishFiles(...$params)
{
return PublicationResolver::resolvePublicationOperation(PublicationResolver::ACTION_PUBLISH, ...$params);
Expand Down
11 changes: 11 additions & 0 deletions code/GraphQL/Schema/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,24 @@
use SilverStripe\GraphQL\Schema\Schema;
use SilverStripe\GraphQL\Schema\Type\Enum;
use SilverStripe\ORM\ArrayLib;
use SilverStripe\Dev\Deprecation;

if (!interface_exists(SchemaUpdater::class)) {
return;
}

/**
* @deprecated 5.3.0 Will be moved to the silverstripe/graphql module
*/
class Builder implements SchemaUpdater
{
public function __construct()
{
Deprecation::withNoReplacement(function () {
Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS);
});
}

public static function updateSchema(Schema $schema): void
{
$categoryValues = array_map(function ($category) {
Expand Down

0 comments on commit 97107b0

Please sign in to comment.