From 5542b38c4941501940019551c34c1f3eb011a7a5 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 28 Nov 2022 17:32:00 +1300 Subject: [PATCH] API Stop using deprecated API --- src/PageTypes/BasePage.php | 4 ---- src/PageTypes/DatedUpdateHolder.php | 2 +- tests/PageTypes/DatedUpdateHolderControllerTest.php | 1 - tests/PageTypes/SitemapPageTest.php | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/PageTypes/BasePage.php b/src/PageTypes/BasePage.php index 9451947..4013dd0 100644 --- a/src/PageTypes/BasePage.php +++ b/src/PageTypes/BasePage.php @@ -95,12 +95,8 @@ public function getFooter() return FooterHolder::get_one(FooterHolder::class); } - /** - * @deprecated 2.2.0 Use RelatedPagesThrough() instead - */ public function RelatedPages() { - Deprecation::notice('2.2.0', 'Use RelatedPagesThrough() instead'); return $this->getManyManyComponents('RelatedPagesThrough'); } diff --git a/src/PageTypes/DatedUpdateHolder.php b/src/PageTypes/DatedUpdateHolder.php index fa5c8dd..2751752 100644 --- a/src/PageTypes/DatedUpdateHolder.php +++ b/src/PageTypes/DatedUpdateHolder.php @@ -154,7 +154,7 @@ public static function AllUpdates( } catch (DatabaseException $e) { self::handleInvalidDateFormat($e); // Ensure invalid SQL does not get run again - $items = $className::get()->limit(0); + $items = $className::get()->limit(null); } // Unpaginated DataList. diff --git a/tests/PageTypes/DatedUpdateHolderControllerTest.php b/tests/PageTypes/DatedUpdateHolderControllerTest.php index 2df16af..5da6618 100644 --- a/tests/PageTypes/DatedUpdateHolderControllerTest.php +++ b/tests/PageTypes/DatedUpdateHolderControllerTest.php @@ -20,7 +20,6 @@ protected function setUp(): void // Note: this test requires the starter theme to be installed Config::modify()->set(SSViewer::class, 'themes', ['starter', '$default']); - Config::modify()->set(SSViewer::class, 'theme', 'starter'); } public function testSettingDateFiltersInReverseOrderShowsMessage() diff --git a/tests/PageTypes/SitemapPageTest.php b/tests/PageTypes/SitemapPageTest.php index 2966b64..b2607ba 100644 --- a/tests/PageTypes/SitemapPageTest.php +++ b/tests/PageTypes/SitemapPageTest.php @@ -18,7 +18,6 @@ protected function setUp(): void parent::setUp(); Config::modify()->set(SSViewer::class, 'themes', ['starter', '$default']); - Config::modify()->set(SSViewer::class, 'theme', 'starter'); } /**