Skip to content

Commit

Permalink
Deprecate the PostAuthor::getName() method
Browse files Browse the repository at this point in the history
Cherry picks commit 2f54b9f from #1782
  • Loading branch information
caendesilva committed Jul 6, 2024
1 parent 6c887e1 commit a6b3ccd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Facades\Author;
use Hyde\Facades\Config;
use Illuminate\Support\Collection;
use JetBrains\PhpStorm\Deprecated;

use function strtolower;
use function is_string;
Expand Down Expand Up @@ -85,6 +86,10 @@ public function __toString(): string
return $this->getName();
}

/**
* @deprecated This is not needed as the name property can be accessed directly.
*/
#[Deprecated(reason: 'Use the name property instead.', replacement: '%class%->name')]
public function getName(): string
{
return $this->name;
Expand Down

0 comments on commit a6b3ccd

Please sign in to comment.