Skip to content

Commit

Permalink
Deprecate Hyde::mediaLink being replaced in v2
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 5, 2024
1 parent ea8dcd0 commit b28efc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ public function relativeLink(string $destination): string
return $this->hyperlinks->relativeLink($destination);
}

/**
* @deprecated This method will be removed in v2.0. Please use `asset()` instead.
*/
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);
}

Expand Down
2 changes: 2 additions & 0 deletions packages/framework/src/Foundation/Kernel/Hyperlinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public function relativeLink(string $destination): string
*
* An exception will be thrown if the file does not exist in the _media directory,
* and the second argument is set to true.
*
* @deprecated This method will be removed in v2.0. Please use `asset()` instead.
*/
public function mediaLink(string $destination, bool $validate = false): string
{
Expand Down

0 comments on commit b28efc4

Please sign in to comment.