From 0838ab4f25f75299f28495dcb9191e03a1ea0f3a Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 15 Dec 2023 15:10:29 +0100 Subject: [PATCH] Remove internal `DocumentationSearchPage::routeKey()` method This is now no longer needed thanks to https://github.com/hydephp/develop/pull/1498, but is kept as protected so the `enabled` method can use it --- .../Documentation/DocumentationSearchPage.php | 3 +-- .../tests/Feature/DocumentationSearchPageTest.php | 11 ----------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php b/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php index 06530bb84a9..a27408c92fd 100644 --- a/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php +++ b/packages/framework/src/Framework/Features/Documentation/DocumentationSearchPage.php @@ -46,8 +46,7 @@ public static function enabled(): bool return Config::getBool('docs.create_search_page', true) && ! Hyde::routes()->has(self::routeKey()); } - /** @deprecated Can be removed by https://github.com/hydephp/develop/pull/1498 */ - public static function routeKey(): string + protected static function routeKey(): string { return ltrim(DocumentationPage::outputDirectory().'/search'); } diff --git a/packages/framework/tests/Feature/DocumentationSearchPageTest.php b/packages/framework/tests/Feature/DocumentationSearchPageTest.php index 22a9b53ed1c..ec91f318044 100644 --- a/packages/framework/tests/Feature/DocumentationSearchPageTest.php +++ b/packages/framework/tests/Feature/DocumentationSearchPageTest.php @@ -59,15 +59,4 @@ public function testEnabledIsFalseWhenDisabledAndRouteExists() Hyde::routes()->put('docs/search', new InMemoryPage('docs/search')); $this->assertFalse(DocumentationSearchPage::enabled()); } - - public function testStaticRouteKeyHelper() - { - $this->assertSame('docs/search', DocumentationSearchPage::routeKey()); - } - - public function testStaticRouteKeyHelperWithCustomOutputDirectory() - { - DocumentationPage::setOutputDirectory('foo'); - $this->assertSame('foo/search', DocumentationSearchPage::routeKey()); - } }