From 4f4a00677918f72adf866464d532aad099a8431b Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:59:28 +1200 Subject: [PATCH] ENH Don't emit deprecation warnings for unavoidable API calls (#1233) --- src/Models/BaseElement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/BaseElement.php b/src/Models/BaseElement.php index bb1c6179..6470eda0 100644 --- a/src/Models/BaseElement.php +++ b/src/Models/BaseElement.php @@ -277,7 +277,7 @@ public function canDelete($member = null) if ($this->hasMethod('getPage')) { if ($page = $this->getPage()) { if ($page->hasExtension(Versioned::class)) { - return $page->canArchive($member); + return Deprecation::withNoReplacement(fn() => $page->canArchive($member)); } else { return $page->canDelete($member); }