diff --git a/packages/framework/src/Foundation/Concerns/ForwardsHyperlinks.php b/packages/framework/src/Foundation/Concerns/ForwardsHyperlinks.php index 9d194fd5f42..7f5bef1d14e 100644 --- a/packages/framework/src/Foundation/Concerns/ForwardsHyperlinks.php +++ b/packages/framework/src/Foundation/Concerns/ForwardsHyperlinks.php @@ -5,6 +5,7 @@ namespace Hyde\Foundation\Concerns; use Hyde\Support\Models\Route; +use JetBrains\PhpStorm\Deprecated; /** * @internal Single-use trait for the HydeKernel class. @@ -23,8 +24,14 @@ public function relativeLink(string $destination): string return $this->hyperlinks->relativeLink($destination); } + /** + * @deprecated This method will be removed in v2.0. Please use `asset()` instead. + */ + #[Deprecated(reason: 'Use `asset` method instead.', replacement: '%class%::asset(%parameter0%)')] public function mediaLink(string $destination, bool $validate = false): string { + trigger_deprecation('hyde/framework', '1.8.0', 'The %s() method is deprecated, use %s() instead.', __METHOD__, 'asset'); + return $this->hyperlinks->mediaLink($destination, $validate); }