diff --git a/src/GraphQL/Operations/AbstractPublishOperationCreator.php b/src/GraphQL/Operations/AbstractPublishOperationCreator.php index 577d7ab9..21c2d37b 100644 --- a/src/GraphQL/Operations/AbstractPublishOperationCreator.php +++ b/src/GraphQL/Operations/AbstractPublishOperationCreator.php @@ -23,6 +23,7 @@ use SilverStripe\Versioned\GraphQL\Resolvers\VersionedResolver; use SilverStripe\Versioned\Versioned; use SilverStripe\View\ViewableData; +use SilverStripe\Dev\Deprecation; // GraphQL dependency is optional in versioned, // and the following implementation relies on existence of this class (in GraphQL v4) @@ -32,6 +33,7 @@ /** * Scaffolds a generic update operation for DataObjects. + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module */ abstract class AbstractPublishOperationCreator implements OperationCreator { @@ -41,6 +43,13 @@ abstract class AbstractPublishOperationCreator implements OperationCreator 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); + }); + } + /** * @param SchemaModelInterface $model * @param string $typeName diff --git a/src/GraphQL/Operations/CopyToStageCreator.php b/src/GraphQL/Operations/CopyToStageCreator.php index 46ca27d6..b690cda6 100644 --- a/src/GraphQL/Operations/CopyToStageCreator.php +++ b/src/GraphQL/Operations/CopyToStageCreator.php @@ -13,6 +13,7 @@ use SilverStripe\Versioned\GraphQL\Resolvers\VersionedResolver; use SilverStripe\Versioned\Versioned; use SilverStripe\View\ViewableData; +use SilverStripe\Dev\Deprecation; // GraphQL dependency is optional in versioned, // and the following implementation relies on existence of this class (in GraphQL v4) @@ -25,12 +26,20 @@ * * copy[TypeName]ToStage(ID!, FromVersion!, FromStage!, ToStage!) * + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module */ class CopyToStageCreator implements OperationCreator { use Configurable; use Injectable; + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } + /** * @var array * @config diff --git a/src/GraphQL/Operations/PublishCreator.php b/src/GraphQL/Operations/PublishCreator.php index 70f8ea18..6d03e882 100644 --- a/src/GraphQL/Operations/PublishCreator.php +++ b/src/GraphQL/Operations/PublishCreator.php @@ -3,6 +3,7 @@ namespace SilverStripe\Versioned\GraphQL\Operations; use SilverStripe\GraphQL\Schema\Interfaces\OperationCreator; +use SilverStripe\Dev\Deprecation; // GraphQL dependency is optional in versioned, // and the following implementation relies on existence of this class (in GraphQL v4) @@ -12,9 +13,17 @@ /** * Scaffolds a generic update operation for DataObjects. + * + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module */ class PublishCreator extends AbstractPublishOperationCreator { + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } /** * @param string $typeName diff --git a/src/GraphQL/Operations/RollbackCreator.php b/src/GraphQL/Operations/RollbackCreator.php index 86bf9a70..37422434 100644 --- a/src/GraphQL/Operations/RollbackCreator.php +++ b/src/GraphQL/Operations/RollbackCreator.php @@ -12,6 +12,7 @@ use SilverStripe\Versioned\GraphQL\Resolvers\VersionedResolver; use SilverStripe\Versioned\Versioned; use SilverStripe\View\ViewableData; +use SilverStripe\Dev\Deprecation; // GraphQL dependency is optional in versioned, // and the following implementation relies on existence of this class (in GraphQL v4) @@ -23,12 +24,21 @@ * Scaffolds a "rollback recursive" operation for DataObjects. * * rollback[TypeName](ID!, ToVersion!) + * + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module */ class RollbackCreator implements OperationCreator { use Injectable; use Configurable; + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } + /** * @var array * @config diff --git a/src/GraphQL/Operations/UnpublishCreator.php b/src/GraphQL/Operations/UnpublishCreator.php index fb279d0a..8860f92e 100644 --- a/src/GraphQL/Operations/UnpublishCreator.php +++ b/src/GraphQL/Operations/UnpublishCreator.php @@ -12,9 +12,18 @@ /** * Scaffolds a generic update operation for DataObjects. + * + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module */ class UnpublishCreator extends AbstractPublishOperationCreator { + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } + /** * @param string $typeName * @return string diff --git a/src/GraphQL/Plugins/UnpublishOnDelete.php b/src/GraphQL/Plugins/UnpublishOnDelete.php index ed47ddf0..20a805a6 100644 --- a/src/GraphQL/Plugins/UnpublishOnDelete.php +++ b/src/GraphQL/Plugins/UnpublishOnDelete.php @@ -15,6 +15,7 @@ use Exception; use Closure; use SilverStripe\View\ViewableData; +use SilverStripe\Dev\Deprecation; // GraphQL dependency is optional in versioned, // and the following implementation relies on existence of this class (in GraphQL v4) @@ -22,10 +23,20 @@ return; } +/** + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module + */ class UnpublishOnDelete implements ModelMutationPlugin { const IDENTIFIER = 'unpublishOnDelete'; + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } + /** * @return string */ diff --git a/src/GraphQL/Plugins/VersionedDataObject.php b/src/GraphQL/Plugins/VersionedDataObject.php index 8a947e46..b8c91028 100644 --- a/src/GraphQL/Plugins/VersionedDataObject.php +++ b/src/GraphQL/Plugins/VersionedDataObject.php @@ -23,6 +23,7 @@ use SilverStripe\Versioned\Versioned; use Closure; use SilverStripe\View\ViewableData; +use SilverStripe\Dev\Deprecation; // GraphQL dependency is optional in versioned, // and the following implementation relies on existence of this class (in GraphQL v4) @@ -30,10 +31,20 @@ return; } +/** + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module + */ class VersionedDataObject implements ModelTypePlugin, SchemaUpdater { const IDENTIFIER = 'versioning'; + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } + /** * @return string */ diff --git a/src/GraphQL/Plugins/VersionedRead.php b/src/GraphQL/Plugins/VersionedRead.php index 1bce5498..847d47cf 100644 --- a/src/GraphQL/Plugins/VersionedRead.php +++ b/src/GraphQL/Plugins/VersionedRead.php @@ -9,6 +9,7 @@ use SilverStripe\Versioned\GraphQL\Resolvers\VersionedResolver; use SilverStripe\Versioned\Versioned; use SilverStripe\View\ViewableData; +use SilverStripe\Dev\Deprecation; // GraphQL dependency is optional in versioned, // and the following implementation relies on existence of this class (in GraphQL v4) @@ -16,10 +17,20 @@ return; } +/** + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module + */ class VersionedRead implements ModelQueryPlugin { const IDENTIFIER = 'readVersion'; + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } + /** * @return string */ diff --git a/src/GraphQL/Resolvers/VersionFilters.php b/src/GraphQL/Resolvers/VersionFilters.php index 24a3b094..d0e8816d 100644 --- a/src/GraphQL/Resolvers/VersionFilters.php +++ b/src/GraphQL/Resolvers/VersionFilters.php @@ -8,9 +8,20 @@ use SilverStripe\Versioned\Versioned; use InvalidArgumentException; use DateTime; +use SilverStripe\Dev\Deprecation; +/** + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module + */ class VersionFilters { + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } + /** * Use this as a fallback where resolver results aren't queried as a DataList, * but rather use DataObject::get_one(). Example: SiteTree::get_by_link(). diff --git a/src/GraphQL/Resolvers/VersionedResolver.php b/src/GraphQL/Resolvers/VersionedResolver.php index a5c08ecb..bd8a5238 100644 --- a/src/GraphQL/Resolvers/VersionedResolver.php +++ b/src/GraphQL/Resolvers/VersionedResolver.php @@ -21,11 +21,22 @@ use Exception; use Closure; use InvalidArgumentException; +use SilverStripe\Dev\Deprecation; +/** + * @deprecated 5.3.0 Will be moved to the silverstripe/graphql module + */ class VersionedResolver { private static $priority = 1; + public function __construct() + { + Deprecation::withNoReplacement(function () { + Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); + }); + } + /** * @param DataObject $obj * @param array $args