Skip to content

Commit

Permalink
ENH Don't use deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Sep 17, 2024
1 parent 6a98cc1 commit 09dc7f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Controllers/LinkFieldController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function linkDelete(): HTTPResponse
}
$link = $this->linkFromRequest();
if ($link->hasExtension(Versioned::class)) {
$canArchive = Deprecation::withNoReplacement(fn() => $link->canArchive());
$canArchive = Deprecation::withSuppressedWarning(fn() => $link->canArchive());
if (!$canArchive) {
$this->jsonError(403);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Tasks/MigrationTaskTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 withSuppressedWarning() because otherwise even viewing the dev/tasks list will trigger this warning.
Deprecation::withSuppressedWarning(
fn () => Deprecation::notice('4.0.0', 'Will be removed without equivalent functionality.', Deprecation::SCOPE_CLASS)
);
parent::__construct();
Expand Down

0 comments on commit 09dc7f7

Please sign in to comment.