From 7188cf7926c70680058f384ede96e5af5e0ccfee Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 26 Jul 2024 18:50:15 +0200 Subject: [PATCH 1/4] Improve helper function documentation --- packages/framework/src/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/framework/src/helpers.php b/packages/framework/src/helpers.php index 743fffb8efd..14e69878d67 100644 --- a/packages/framework/src/helpers.php +++ b/packages/framework/src/helpers.php @@ -46,7 +46,7 @@ function asset(string $name, bool $preferQualifiedUrl = false): string if (! function_exists('route')) { /** - * Get a page route by its key. + * Get a page route instance by its key. Casting it to a string will return a relative link to the page. */ function route(string $key): ?Hyde\Support\Models\Route { From 4706791043f1abc1fc4a37224a220ca2b3fd6d03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 19:21:27 +0000 Subject: [PATCH 2/4] Bump tailwindcss from 3.4.6 to 3.4.7 Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.4.6 to 3.4.7. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v3.4.7/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.4.6...v3.4.7) --- updated-dependencies: - dependency-name: tailwindcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 54a30740e17..bd33dae5dfd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "laravel-mix": "^6.0.49", "postcss": "^8.4.40", "prettier": "3.3.3", - "tailwindcss": "^3.4.6" + "tailwindcss": "^3.4.7" } }, "node_modules/@alloc/quick-lru": { @@ -8732,9 +8732,9 @@ } }, "node_modules/tailwindcss": { - "version": "3.4.6", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.6.tgz", - "integrity": "sha512-1uRHzPB+Vzu57ocybfZ4jh5Q3SdlH7XW23J5sQoM9LhE9eIOlzxer/3XPSsycvih3rboRsvt0QCmzSrqyOYUIA==", + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.7.tgz", + "integrity": "sha512-rxWZbe87YJb4OcSopb7up2Ba4U82BoiSGUdoDr3Ydrg9ckxFS/YWsvhN323GMcddgU65QRy7JndC7ahhInhvlQ==", "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", @@ -16385,9 +16385,9 @@ } }, "tailwindcss": { - "version": "3.4.6", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.6.tgz", - "integrity": "sha512-1uRHzPB+Vzu57ocybfZ4jh5Q3SdlH7XW23J5sQoM9LhE9eIOlzxer/3XPSsycvih3rboRsvt0QCmzSrqyOYUIA==", + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.7.tgz", + "integrity": "sha512-rxWZbe87YJb4OcSopb7up2Ba4U82BoiSGUdoDr3Ydrg9ckxFS/YWsvhN323GMcddgU65QRy7JndC7ahhInhvlQ==", "dev": true, "requires": { "@alloc/quick-lru": "^5.2.0", diff --git a/package.json b/package.json index aee59fe2526..00d84d634cd 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,6 @@ "laravel-mix": "^6.0.49", "postcss": "^8.4.40", "prettier": "3.3.3", - "tailwindcss": "^3.4.6" + "tailwindcss": "^3.4.7" } } From 4366f2b365bde51d87fc3c4243f73fcc3294c9fb Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 28 Jul 2024 14:54:22 +0200 Subject: [PATCH 3/4] Update the Hyde facade to use single mixin of several method annotations Let's see if this has gotten better support. If this works, it means that clicking a usage will actually lead to the implementation, and we can get better support for PHPDoc annotations like usages and deprecations. --- packages/framework/src/Hyde.php | 54 +-------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/packages/framework/src/Hyde.php b/packages/framework/src/Hyde.php index 860bd77cccb..cc0df0dc049 100644 --- a/packages/framework/src/Hyde.php +++ b/packages/framework/src/Hyde.php @@ -4,17 +4,8 @@ namespace Hyde; -use Hyde\Enums\Feature; -use Hyde\Facades\Features; use Hyde\Foundation\HydeKernel; -use Hyde\Foundation\Kernel\FileCollection; -use Hyde\Foundation\Kernel\Filesystem; -use Hyde\Foundation\Kernel\PageCollection; -use Hyde\Foundation\Kernel\RouteCollection; -use Hyde\Pages\Concerns\HydePage; -use Hyde\Support\Models\Route; use Illuminate\Support\Facades\Facade; -use Illuminate\Support\HtmlString; use JetBrains\PhpStorm\Pure; /** @@ -26,50 +17,7 @@ * @copyright 2022 Caen De Silva * @license MIT License * - * @method static string path(string $path = '') - * @method static string vendorPath(string $path = '', string $package = 'framework') - * @method static string pathToAbsolute(string $path) - * @method static string pathToRelative(string $path) - * @method static string sitePath(string $path = '') - * @method static string mediaPath(string $path = '') - * @method static string siteMediaPath(string $path = '') - * @method static string formatLink(string $destination) - * @method static string relativeLink(string $destination) - * @method static string mediaLink(string $destination, bool $validate = false) - * @method static string asset(string $name, bool $preferQualifiedUrl = false) - * @method static string url(string $path = '') - * @method static Route|null route(string $key) - * @method static string makeTitle(string $value) - * @method static string normalizeNewlines(string $string) - * @method static string stripNewlines(string $string) - * @method static string trimSlashes(string $string) - * @method static HtmlString markdown(string $text, bool $stripIndentation = false) - * @method static string currentPage() - * @method static string currentRouteKey() - * @method static string getBasePath() - * @method static string getSourceRoot() - * @method static string getOutputDirectory() - * @method static string getMediaDirectory() - * @method static string getMediaOutputDirectory() - * @method static Features features() - * @method static FileCollection files() - * @method static PageCollection pages() - * @method static RouteCollection routes() - * @method static Route|null currentRoute() - * @method static HydeKernel getInstance() - * @method static Filesystem filesystem() - * @method static array getRegisteredExtensions() - * @method static bool hasFeature(Feature $feature) - * @method static bool hasSiteUrl() - * @method static void setInstance(HydeKernel $instance) - * @method static void setBasePath(string $basePath) - * @method static void setOutputDirectory(string $outputDirectory) - * @method static void setMediaDirectory(string $mediaDirectory) - * @method static void setSourceRoot(string $sourceRoot) - * @method static void shareViewData(HydePage $page) - * @method static array toArray() - * @method static bool isBooted() - * @method static void boot() + * @mixin \Hyde\Foundation\HydeKernel * * @see \Hyde\Foundation\Concerns\ForwardsFilesystem * @see \Hyde\Foundation\Concerns\ForwardsHyperlinks From 7d3af569756da2ec966cd5885c3a220e4ef77ac5 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sun, 28 Jul 2024 15:50:31 +0200 Subject: [PATCH 4/4] Update RELEASE_NOTES.md --- RELEASE_NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 9894f033425..edc66d3f209 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -16,6 +16,7 @@ This serves two purposes: - All page types now support the `description` front matter field (used in page metadata) in https://github.com/hydephp/develop/pull/1884 ### Changed +- Changed the `Hyde` facade to use a `@mixin` annotation instead of single method annotations in https://github.com/hydephp/develop/pull/1919 - Updated the `Serializable` trait to provide a default automatic `toArray` method in https://github.com/hydephp/develop/pull/1791 - Updated the `PostAuthor` class's `name` property to fall back to the `username` property if the `name` property is not set in https://github.com/hydephp/develop/pull/1794 - Removed the nullable type hint from the `PostAuthor` class's `name` property as it is now always set in https://github.com/hydephp/develop/pull/1794