From 38608b81dde77497e6a1283f0f3b9e81432ed039 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 15 Dec 2023 13:32:59 +0100 Subject: [PATCH] Remove hacky route injection in favour of new search page implementation Targets the realtime compiler v4 as it's a breaking change that requires Hyde v2. See https://github.com/hydephp/develop/pull/1498 --- packages/realtime-compiler/src/Routing/PageRouter.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/realtime-compiler/src/Routing/PageRouter.php b/packages/realtime-compiler/src/Routing/PageRouter.php index 3d29cc7d18c..a3a3876203a 100644 --- a/packages/realtime-compiler/src/Routing/PageRouter.php +++ b/packages/realtime-compiler/src/Routing/PageRouter.php @@ -8,7 +8,6 @@ use Hyde\Pages\Concerns\BaseMarkdownPage; use Hyde\Framework\Actions\StaticPageBuilder; use Hyde\RealtimeCompiler\Http\LiveEditController; -use Hyde\Framework\Features\Documentation\DocumentationSearchPage; use Hyde\Pages\Concerns\HydePage; use Hyde\RealtimeCompiler\Concerns\InteractsWithLaravel; use Hyde\RealtimeCompiler\Concerns\SendsErrorResponses; @@ -90,13 +89,6 @@ public static function handle(Request $request): Response protected function getPageFromRoute(): HydePage { - /** @deprecated Can be removed by https://github.com/hydephp/develop/pull/1498 */ - if (unslash($this->request->path) === DocumentationSearchPage::routeKey() && DocumentationSearchPage::enabled()) { - // Since this page is not present within the search index (as it's normally generated by a build task) - // we instantiate and return it here. - return new DocumentationSearchPage(); - } - return Routes::getOrFail($this->normalizePath($this->request->path))->getPage(); } }