Skip to content

Commit

Permalink
Merge pull request #1302 from creative-commoners/pulls/1/deprecated
Browse files Browse the repository at this point in the history
API Update deprecations
  • Loading branch information
GuySartorelli authored Oct 25, 2022
2 parents b90b60f + 50f45ff commit ce33714
Show file tree
Hide file tree
Showing 25 changed files with 172 additions and 26 deletions.
4 changes: 3 additions & 1 deletion _legacy/GraphQL/CreateFileMutationCreator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\ResolveInfo;
use SilverStripe\Assets\File;
use SilverStripe\Assets\Folder;
Expand All @@ -15,7 +16,7 @@
}
/**
* @todo Allow file upload (https://github.com/silverstripe/silverstripe-graphql/issues/19)
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class CreateFileMutationCreator extends MutationCreator implements OperationResolver
{
Expand All @@ -26,6 +27,7 @@ class CreateFileMutationCreator extends MutationCreator implements OperationReso

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
$this->accessor = new CaseInsensitiveFieldAccessor();

parent::__construct($manager);
Expand Down
4 changes: 3 additions & 1 deletion _legacy/GraphQL/CreateFolderMutationCreator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\ResolveInfo;
use SilverStripe\Assets\Folder;
use SilverStripe\GraphQL\MutationCreator;
Expand All @@ -16,7 +17,7 @@
/**
* API available but currently not used, as create folder uses FormBuilder
*
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class CreateFolderMutationCreator extends MutationCreator implements OperationResolver
{
Expand All @@ -27,6 +28,7 @@ class CreateFolderMutationCreator extends MutationCreator implements OperationRe

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
$this->accessor = new CaseInsensitiveFieldAccessor();

parent::__construct($manager);
Expand Down
10 changes: 9 additions & 1 deletion _legacy/GraphQL/DeleteFileMutationCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\ResolveInfo;
use SilverStripe\Assets\File;
use GraphQL\Type\Definition\Type;
use SilverStripe\GraphQL\Manager;
use SilverStripe\GraphQL\MutationCreator;
use SilverStripe\GraphQL\OperationResolver;
use SilverStripe\ORM\DataList;
Expand All @@ -17,11 +19,17 @@
/**
* Handles create and update
*
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class DeleteFileMutationCreator extends MutationCreator implements OperationResolver
{

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
parent::__construct($manager);
}

public function attributes()
{
return [
Expand Down
10 changes: 9 additions & 1 deletion _legacy/GraphQL/DescendantFileCountType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use SilverStripe\GraphQL\Manager;
use GraphQL\Type\Definition\Type;
use SilverStripe\GraphQL\TypeCreator;

Expand All @@ -13,13 +15,19 @@
* Define the return type for ReadDescendantFileCountsQueryCreator
* Return as an array of object with an 'id' property and 'count' property.
*
* @deprecated 1.8..2.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class DescendantFileCountType extends TypeCreator
{
/**
* @return array
*/
public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
parent::__construct($manager);
}

public function attributes()
{
return [
Expand Down
10 changes: 9 additions & 1 deletion _legacy/GraphQL/FileFilterInputTypeCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\Type;
use GraphQL\Type\Definition\EnumType;
use SilverStripe\AssetAdmin\Controller\AssetAdminFile;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\GraphQL\Manager;
use SilverStripe\GraphQL\TypeCreator;
use SilverStripe\Assets\File;
use SilverStripe\ORM\Filterable;
Expand All @@ -18,13 +20,19 @@
}

/**
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class FileFilterInputTypeCreator extends TypeCreator
{

protected $inputObject = true;

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
parent::__construct($manager);
}

public function attributes()
{
return [
Expand Down
4 changes: 3 additions & 1 deletion _legacy/GraphQL/FileInputTypeCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use SilverStripe\GraphQL\Util\CaseInsensitiveFieldAccessor;
use GraphQL\Type\Definition\Type;
use SilverStripe\GraphQL\TypeCreator;
Expand All @@ -13,7 +14,7 @@

/**
* @todo Allow setting of Owner and ShowInSearch fields
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class FileInputTypeCreator extends TypeCreator
{
Expand All @@ -27,6 +28,7 @@ class FileInputTypeCreator extends TypeCreator

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
$this->accessor = new CaseInsensitiveFieldAccessor();

parent::__construct($manager);
Expand Down
10 changes: 9 additions & 1 deletion _legacy/GraphQL/FileInterfaceTypeCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use SilverStripe\GraphQL\DataObjectInterfaceTypeCreator;
use SilverStripe\GraphQL\Manager;
use GraphQL\Type\Definition\Type;
use SilverStripe\Assets\File;
use SilverStripe\Assets\Folder;
Expand All @@ -14,11 +16,17 @@

/**
* @skipUpgrade
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class FileInterfaceTypeCreator extends DataObjectInterfaceTypeCreator
{

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
parent::__construct($manager);
}

public function attributes()
{
return [
Expand Down
3 changes: 2 additions & 1 deletion _legacy/GraphQL/FileTypeCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* @skipUpgrade
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class FileTypeCreator extends TypeCreator
{
Expand All @@ -37,6 +37,7 @@ class FileTypeCreator extends TypeCreator

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
$this->accessor = new CaseInsensitiveFieldAccessor();

parent::__construct($manager);
Expand Down
10 changes: 9 additions & 1 deletion _legacy/GraphQL/FileUsageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\Type;
use SilverStripe\GraphQL\Manager;
use SilverStripe\GraphQL\TypeCreator;
use GraphQL\Type\Definition\ResolveInfo;
use Exception;
Expand All @@ -15,13 +17,19 @@
* Define the return type for ReadFileUsageQueryCreator. File usage is return as an array of object with an
* 'id' property and 'inUseCount' property.
*
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class FileUsageType extends TypeCreator
{
/**
* @return array
*/
public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
parent::__construct($manager);
}

public function attributes()
{
return [
Expand Down
4 changes: 3 additions & 1 deletion _legacy/GraphQL/FolderInputTypeCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use SilverStripe\GraphQL\Util\CaseInsensitiveFieldAccessor;
use GraphQL\Type\Definition\Type;
use SilverStripe\GraphQL\TypeCreator;
Expand All @@ -12,7 +13,7 @@
}

/**
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class FolderInputTypeCreator extends TypeCreator
{
Expand All @@ -26,6 +27,7 @@ class FolderInputTypeCreator extends TypeCreator

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
$this->accessor = new CaseInsensitiveFieldAccessor();

parent::__construct($manager);
Expand Down
10 changes: 9 additions & 1 deletion _legacy/GraphQL/FolderTypeCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\ResolveInfo;
use GraphQL\Type\Definition\Type;
use SilverStripe\AssetAdmin\Controller\AssetAdminFile;
Expand All @@ -10,6 +11,7 @@
use SilverStripe\Assets\Folder;
use SilverStripe\ORM\Filterable;
use SilverStripe\Versioned\Versioned;
use SilverStripe\GraphQL\Manager;
use SilverStripe\GraphQL\Pagination\Connection;
use SilverStripe\GraphQL\TypeCreator;
use SilverStripe\ORM\DataQuery;
Expand All @@ -22,11 +24,17 @@

/**
* @skipUpgrade
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class FolderTypeCreator extends FileTypeCreator
{

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
parent::__construct($manager);
}

public function attributes()
{
return [
Expand Down
4 changes: 3 additions & 1 deletion _legacy/GraphQL/MoveFilesMutationCreator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\Type;
use GraphQL\Type\Definition\ResolveInfo;
use SilverStripe\Assets\File;
Expand All @@ -16,7 +17,7 @@
}

/**
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class MoveFilesMutationCreator extends MutationCreator implements OperationResolver
{
Expand All @@ -27,6 +28,7 @@ class MoveFilesMutationCreator extends MutationCreator implements OperationResol

public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
$this->accessor = new CaseInsensitiveFieldAccessor();

parent::__construct($manager);
Expand Down
10 changes: 9 additions & 1 deletion _legacy/GraphQL/PublicationMutationCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use SilverStripe\Assets\File;
use SilverStripe\Versioned\Versioned;
use SilverStripe\GraphQL\Manager;
use SilverStripe\GraphQL\MutationCreator;
use SilverStripe\GraphQL\OperationResolver;
use GraphQL\Type\Definition\ResolveInfo;
Expand All @@ -16,7 +18,7 @@
}

/**
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
abstract class PublicationMutationCreator extends MutationCreator implements OperationResolver
{
Expand All @@ -38,6 +40,12 @@ abstract class PublicationMutationCreator extends MutationCreator implements Ope
/**
* @return array
*/
public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
parent::__construct($manager);
}

public function attributes()
{
return [
Expand Down
10 changes: 9 additions & 1 deletion _legacy/GraphQL/PublicationNoticeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace SilverStripe\AssetAdmin\GraphQL;

use SilverStripe\Dev\Deprecation;
use GraphQL\Type\Definition\Type;
use SilverStripe\GraphQL\Manager;
use SilverStripe\GraphQL\TypeCreator;
use GraphQL\Type\Definition\ResolveInfo;
use Exception;
Expand All @@ -12,13 +14,19 @@
}

/**
* @deprecated 4.8..5.0 Use silverstripe/graphql:^4 functionality.
* @deprecated 1.8.0 Use the latest version of graphql instead
*/
class PublicationNoticeType extends TypeCreator
{
/**
* @return array
*/
public function __construct(Manager $manager = null)
{
Deprecation::notice('1.8.0', 'Use the latest version of graphql instead', Deprecation::SCOPE_CLASS);
parent::__construct($manager);
}

public function attributes()
{
return [
Expand Down
Loading

0 comments on commit ce33714

Please sign in to comment.