diff --git a/src/GraphQL/Operations/AbstractPublishOperationCreator.php b/src/GraphQL/Operations/AbstractPublishOperationCreator.php index a707563e..48f76c36 100644 --- a/src/GraphQL/Operations/AbstractPublishOperationCreator.php +++ b/src/GraphQL/Operations/AbstractPublishOperationCreator.php @@ -45,7 +45,7 @@ abstract class AbstractPublishOperationCreator implements OperationCreator public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Operations/CopyToStageCreator.php b/src/GraphQL/Operations/CopyToStageCreator.php index b43e71ce..104110cd 100644 --- a/src/GraphQL/Operations/CopyToStageCreator.php +++ b/src/GraphQL/Operations/CopyToStageCreator.php @@ -35,7 +35,7 @@ class CopyToStageCreator implements OperationCreator public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Operations/PublishCreator.php b/src/GraphQL/Operations/PublishCreator.php index 34c521a9..719f7141 100644 --- a/src/GraphQL/Operations/PublishCreator.php +++ b/src/GraphQL/Operations/PublishCreator.php @@ -20,7 +20,7 @@ class PublishCreator extends AbstractPublishOperationCreator { public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Operations/RollbackCreator.php b/src/GraphQL/Operations/RollbackCreator.php index a7043797..a6bba05f 100644 --- a/src/GraphQL/Operations/RollbackCreator.php +++ b/src/GraphQL/Operations/RollbackCreator.php @@ -34,7 +34,7 @@ class RollbackCreator implements OperationCreator public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Operations/UnpublishCreator.php b/src/GraphQL/Operations/UnpublishCreator.php index bc542c0c..2a457801 100644 --- a/src/GraphQL/Operations/UnpublishCreator.php +++ b/src/GraphQL/Operations/UnpublishCreator.php @@ -20,7 +20,7 @@ class UnpublishCreator extends AbstractPublishOperationCreator { public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Plugins/UnpublishOnDelete.php b/src/GraphQL/Plugins/UnpublishOnDelete.php index fa6756c2..458f8600 100644 --- a/src/GraphQL/Plugins/UnpublishOnDelete.php +++ b/src/GraphQL/Plugins/UnpublishOnDelete.php @@ -32,7 +32,7 @@ class UnpublishOnDelete implements ModelMutationPlugin public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Plugins/VersionedDataObject.php b/src/GraphQL/Plugins/VersionedDataObject.php index acc246cb..1bc6b600 100644 --- a/src/GraphQL/Plugins/VersionedDataObject.php +++ b/src/GraphQL/Plugins/VersionedDataObject.php @@ -40,7 +40,7 @@ class VersionedDataObject implements ModelTypePlugin, SchemaUpdater public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Plugins/VersionedRead.php b/src/GraphQL/Plugins/VersionedRead.php index 3d1f9c46..90fddc62 100644 --- a/src/GraphQL/Plugins/VersionedRead.php +++ b/src/GraphQL/Plugins/VersionedRead.php @@ -26,7 +26,7 @@ class VersionedRead implements ModelQueryPlugin public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Resolvers/VersionFilters.php b/src/GraphQL/Resolvers/VersionFilters.php index 559d3bf5..2fc8888d 100644 --- a/src/GraphQL/Resolvers/VersionFilters.php +++ b/src/GraphQL/Resolvers/VersionFilters.php @@ -17,7 +17,7 @@ class VersionFilters { public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GraphQL/Resolvers/VersionedResolver.php b/src/GraphQL/Resolvers/VersionedResolver.php index ef805466..a03864c1 100644 --- a/src/GraphQL/Resolvers/VersionedResolver.php +++ b/src/GraphQL/Resolvers/VersionedResolver.php @@ -32,7 +32,7 @@ class VersionedResolver public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('2.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/src/GridFieldArchiveAction.php b/src/GridFieldArchiveAction.php index ec632e29..bf8eaa40 100644 --- a/src/GridFieldArchiveAction.php +++ b/src/GridFieldArchiveAction.php @@ -177,7 +177,7 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat return; } - $canArchive = Deprecation::withNoReplacement(fn() => $item->canArchive()); + $canArchive = Deprecation::withSuppressedWarning(fn() => $item->canArchive()); if (!$canArchive) { throw new ValidationException( _t(__CLASS__ . '.ArchivePermissionsFailure', "No archive permissions") @@ -201,7 +201,7 @@ public function getArchiveAction($gridField, $record) if (!$record->hasMethod('canArchive')) { return null; } - $canArchive = Deprecation::withNoReplacement(fn() => $record->canArchive()); + $canArchive = Deprecation::withSuppressedWarning(fn() => $record->canArchive()); if (!$canArchive) { return null; } diff --git a/src/Versioned.php b/src/Versioned.php index fc40f2b2..e3226703 100644 --- a/src/Versioned.php +++ b/src/Versioned.php @@ -1509,7 +1509,7 @@ public function canArchive($member = null) // Standard mechanism for accepting permission changes from extensions $owner = $this->owner; - $extended = Deprecation::withNoReplacement(fn() => $owner->extendedCan('canArchive', $member)); + $extended = Deprecation::withSuppressedWarning(fn() => $owner->extendedCan('canArchive', $member)); if ($extended !== null) { return $extended; } @@ -2027,7 +2027,7 @@ public function stagesDifferRecursive(): bool public function Versions($filter = "", $sort = "", $limit = "", $join = "", $having = "") { if ($having) { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { $message = 'The $having parameter does nothing and will be removed without equivalent' . ' functionality to replace it'; Deprecation::notice('2.2.0', $message); diff --git a/src/VersionedGridFieldItemRequest.php b/src/VersionedGridFieldItemRequest.php index 9f23d801..7b07fc79 100644 --- a/src/VersionedGridFieldItemRequest.php +++ b/src/VersionedGridFieldItemRequest.php @@ -119,7 +119,7 @@ public function doArchive($data, $form) { /** @var Versioned|DataObject $record */ $record = $this->getRecord(); - $canArchive = Deprecation::withNoReplacement(fn() => $record->canArchive()); + $canArchive = Deprecation::withSuppressedWarning(fn() => $record->canArchive()); if (!$canArchive) { return $this->httpError(403); } @@ -295,7 +295,7 @@ protected function addVersionedButtons(DataObject $record, FieldList $actions) $canPublish = $record->canPublish(); $canUnpublish = $record->canUnpublish(); $canEdit = $record->canEdit(); - $canArchive = Deprecation::withNoReplacement(fn() => $record->canArchive()); + $canArchive = Deprecation::withSuppressedWarning(fn() => $record->canArchive()); // "save", supports an alternate state that is still clickable, but notifies the user that the action is not needed. $noChangesClasses = 'btn-outline-primary font-icon-tick';