diff --git a/code/BatchActions/CMSBatchAction_Archive.php b/code/BatchActions/CMSBatchAction_Archive.php index c0f8412c61..886a49f1ac 100644 --- a/code/BatchActions/CMSBatchAction_Archive.php +++ b/code/BatchActions/CMSBatchAction_Archive.php @@ -29,6 +29,6 @@ public function run(SS_List $pages): HTTPResponse public function applicablePages($ids) { // canArchive() is deprecated, not $this->applicablePagesHelper() - return Deprecation::withNoReplacement(fn() => $this->applicablePagesHelper($ids, 'canArchive')); + return Deprecation::withSuppressedWarning(fn() => $this->applicablePagesHelper($ids, 'canArchive')); } } diff --git a/code/BatchActions/CMSBatchAction_Restore.php b/code/BatchActions/CMSBatchAction_Restore.php index d9699c6c59..928401c986 100644 --- a/code/BatchActions/CMSBatchAction_Restore.php +++ b/code/BatchActions/CMSBatchAction_Restore.php @@ -20,7 +20,7 @@ class CMSBatchAction_Restore extends CMSBatchAction { public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('5.3.0', 'Will be removed without equivalent functionality to replace it', Deprecation::SCOPE_CLASS); }); } diff --git a/code/Controllers/CMSMain.php b/code/Controllers/CMSMain.php index 4c559bf765..ce450b1b4b 100644 --- a/code/Controllers/CMSMain.php +++ b/code/Controllers/CMSMain.php @@ -1998,7 +1998,7 @@ public function archive(array $data, Form $form): HTTPResponse if (!$record || !$record->exists()) { throw new HTTPResponse_Exception("Bad record ID #$id", 404); } - $canArchive = Deprecation::withNoReplacement(fn() => $record->canArchive()); + $canArchive = Deprecation::withSuppressedWarning(fn() => $record->canArchive()); if (!$canArchive) { return Security::permissionFailure(); } diff --git a/code/GraphQL/LinkablePlugin.php b/code/GraphQL/LinkablePlugin.php index 798cb5792d..469885f829 100644 --- a/code/GraphQL/LinkablePlugin.php +++ b/code/GraphQL/LinkablePlugin.php @@ -49,7 +49,7 @@ class LinkablePlugin implements ModelQueryPlugin public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/code/GraphQL/Resolver.php b/code/GraphQL/Resolver.php index 19c4ff5c29..c45e962fbc 100644 --- a/code/GraphQL/Resolver.php +++ b/code/GraphQL/Resolver.php @@ -13,7 +13,7 @@ class Resolver { public function __construct() { - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { Deprecation::notice('5.3.0', 'Will be moved to the silverstripe/graphql module', Deprecation::SCOPE_CLASS); }); } diff --git a/code/Model/SiteTree.php b/code/Model/SiteTree.php index e3bb850851..c15d67ac38 100755 --- a/code/Model/SiteTree.php +++ b/code/Model/SiteTree.php @@ -2578,7 +2578,7 @@ public function getCMSActions() // If a page is on any stage it can be archived if (($isOnDraft || $isPublished)) { - $canArchive = Deprecation::withNoReplacement(fn() => $this->canArchive()); + $canArchive = Deprecation::withSuppressedWarning(fn() => $this->canArchive()); if ($canArchive) { $title = $isPublished ? _t('SilverStripe\\CMS\\Controllers\\CMSMain.UNPUBLISH_AND_ARCHIVE', 'Unpublish and archive') diff --git a/code/Model/SiteTreeExtension.php b/code/Model/SiteTreeExtension.php index 6348a283eb..aa32ef67ba 100644 --- a/code/Model/SiteTreeExtension.php +++ b/code/Model/SiteTreeExtension.php @@ -18,10 +18,10 @@ abstract class SiteTreeExtension extends DataExtension { public function __construct() { - // Wrapping with Deprecation::withNoReplacement() to avoid triggering deprecation notices + // Wrapping with Deprecation::withSuppressedWarning() to avoid triggering deprecation notices // as we are unable to update existing subclasses of this class until a new major // unless we add in the pointless empty methods that are in this class - Deprecation::withNoReplacement(function () { + Deprecation::withSuppressedWarning(function () { $class = Extension::class; Deprecation::notice('5.3.0', "Subclass $class instead", Deprecation::SCOPE_CLASS); });