From 80b1ecd1476f9072372d53eb47e64d5644569896 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 6 Jan 2025 16:15:03 +1300 Subject: [PATCH] API Remove deprecated API --- .../Engine/SiteTreePublishingEngine.php | 89 ------------------- 1 file changed, 89 deletions(-) diff --git a/src/Extension/Engine/SiteTreePublishingEngine.php b/src/Extension/Engine/SiteTreePublishingEngine.php index 75102a0..9b2c063 100644 --- a/src/Extension/Engine/SiteTreePublishingEngine.php +++ b/src/Extension/Engine/SiteTreePublishingEngine.php @@ -7,7 +7,6 @@ use SilverStripe\Core\Extension; use SilverStripe\Core\Injector\Injector; use SilverStripe\Core\Resettable; -use SilverStripe\Dev\Deprecation; use SilverStripe\ORM\DataObject; use SilverStripe\StaticPublishQueue\Contract\StaticPublishingTrigger; use SilverStripe\StaticPublishQueue\Extension\Publishable\PublishableSiteTree; @@ -51,88 +50,6 @@ class SiteTreePublishingEngine extends Extension implements Resettable */ private array $urlsToDelete = []; - /** - * Queues the urls to be flushed into the queue. - * - * @var array - * @deprecated 6.0.0 Use $urlsToDelete instead - */ - private $toUpdate = []; - - /** - * Queues the urls to be deleted as part of a next flush operation. - * - * @var array - * @deprecated 6.0.0 Use $urlsToDelete instead - */ - private $toDelete = []; - - /** - * @return array - * @deprecated 6.0.0 Use getUrlsToUpdate() instead - */ - public function getToUpdate() - { - Deprecation::notice('6.0.0', 'Use getUrlsToUpdate() instead'); - - return $this->toUpdate; - } - - /** - * @return array - * @deprecated 6.0.0 Use getUrlsToDelete() instead - */ - public function getToDelete() - { - Deprecation::notice('6.0.0', 'Use getUrlsToDelete() instead'); - - return $this->toDelete; - } - - /** - * @param array $toUpdate - * @return $this - * @deprecated 6.0.0 Use setUrlsToUpdate() instead - */ - public function setToUpdate($toUpdate) - { - Deprecation::notice('6.0.0', 'Use setUrlsToUpdate() instead'); - - $urlsToUpdate = []; - - foreach ($toUpdate as $objectToUpdate) { - $urlsToUpdate = array_merge($urlsToUpdate, array_keys($objectToUpdate->urlsToCache())); - } - - $this->setUrlsToUpdate($urlsToUpdate); - // Legacy support so that getToUpdate() still returns the expected array of DataObjects - $this->toUpdate = $toUpdate; - - return $this; - } - - /** - * @param array $toDelete - * @return $this - * @deprecated 6.0.0 Use setUrlsToDelete() instead - */ - public function setToDelete($toDelete) - { - Deprecation::notice('6.0.0', 'Use setUrlsToUpdate() instead'); - - $urlsToDelete = []; - - foreach ($toDelete as $objectToDelete) { - $urlsToDelete = array_merge($urlsToDelete, array_keys($objectToDelete->urlsToCache())); - } - - $this->setUrlsToDelete($urlsToDelete); - // Legacy support so that getToDelete() still returns the expected array of DataObjects - $this->toDelete = $toDelete; - - return $this; - } - public static function reset(): void { static::$queueService = null; @@ -282,12 +199,6 @@ public function collectChanges($context) if (!$siteTree->hasExtension(PublishableSiteTree::class) && !($siteTree instanceof StaticPublishingTrigger)) { return; } - - // Fetch our objects to be actioned - Deprecation::withSuppressedNotice(function () use ($siteTree, $context): void { - $this->setToUpdate($siteTree->objectsToUpdate($context)); - $this->setToDelete($siteTree->objectsToDelete($context)); - }); }); }