Skip to content

Commit

Permalink
Merge pull request #316 from creative-commoners/pulls/2/stop-using-depr
Browse files Browse the repository at this point in the history
API Stop using deprecated API
  • Loading branch information
sabina-talipova authored Dec 5, 2022
2 parents c716712 + 5542b38 commit 70f7275
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
4 changes: 0 additions & 4 deletions src/PageTypes/BasePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
2 changes: 1 addition & 1 deletion src/PageTypes/DatedUpdateHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion tests/PageTypes/DatedUpdateHolderControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion tests/PageTypes/SitemapPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/**
Expand Down

0 comments on commit 70f7275

Please sign in to comment.