From 3582f12c52d252131b6e904a4bd2b91f517ff812 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Wed, 18 Sep 2024 10:52:45 +1200 Subject: [PATCH] ENH Don't use deprecated method --- src/Controllers/LinkFieldController.php | 2 +- src/Tasks/MigrationTaskTrait.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controllers/LinkFieldController.php b/src/Controllers/LinkFieldController.php index 840d5c25..965ccb31 100644 --- a/src/Controllers/LinkFieldController.php +++ b/src/Controllers/LinkFieldController.php @@ -134,7 +134,7 @@ public function linkDelete(): HTTPResponse } $link = $this->linkFromRequest(); if ($link->hasExtension(Versioned::class)) { - $canArchive = Deprecation::withNoReplacement(fn() => $link->canArchive()); + $canArchive = Deprecation::withSuppressedNotice(fn() => $link->canArchive()); if (!$canArchive) { $this->jsonError(403); } diff --git a/src/Tasks/MigrationTaskTrait.php b/src/Tasks/MigrationTaskTrait.php index c9c66d69..d13f0ec1 100644 --- a/src/Tasks/MigrationTaskTrait.php +++ b/src/Tasks/MigrationTaskTrait.php @@ -47,8 +47,8 @@ trait MigrationTaskTrait public function __construct() { - // Use withNoReplacement() because otherwise even viewing the dev/tasks list will trigger this warning. - Deprecation::withNoReplacement( + // Use withSuppressedNotice() because otherwise even viewing the dev/tasks list will trigger this warning. + Deprecation::withSuppressedNotice( fn () => Deprecation::notice('4.0.0', 'Will be removed without equivalent functionality.', Deprecation::SCOPE_CLASS) ); parent::__construct();