Skip to content

Commit

Permalink
ENH Don't use deprecated method (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Sep 18, 2024
1 parent 6a98cc1 commit 50a502c
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::withSuppressedNotice(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 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();
Expand Down

0 comments on commit 50a502c

Please sign in to comment.