diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 9b077d0ea0c..c7f6e5f27d0 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -15,6 +15,7 @@ This serves two purposes: ### Changed - Internal: Decoupled the monorepo `composer.json` settings in https://github.com/hydephp/develop/pull/1361 +- Changed HydePage return types to static in https://github.com/hydephp/develop/pull/1371 ### Deprecated - for soon-to-be removed features. diff --git a/packages/framework/src/Pages/Concerns/HydePage.php b/packages/framework/src/Pages/Concerns/HydePage.php index 665545212b0..64711bfb4bc 100644 --- a/packages/framework/src/Pages/Concerns/HydePage.php +++ b/packages/framework/src/Pages/Concerns/HydePage.php @@ -105,7 +105,7 @@ public static function isDiscoverable(): bool * * @throws \Hyde\Framework\Exceptions\FileNotFoundException If the page does not exist. */ - public static function get(string $identifier): HydePage + public static function get(string $identifier): static { return Pages::getPage(static::sourcePath($identifier)); } @@ -118,7 +118,7 @@ public static function get(string $identifier): HydePage * * @throws \Hyde\Framework\Exceptions\FileNotFoundException If the file does not exist. */ - public static function parse(string $identifier): HydePage + public static function parse(string $identifier): static { return (new SourceFileParser(static::class, $identifier))->get(); }