From 50a502c67934faf91c51fc490be4e9ef273d4eb0 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:28:49 +1200 Subject: [PATCH] ENH Don't use deprecated method (#337) --- 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();