Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Don't use deprecated method #337

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading