Skip to content

Commit afbbb64

Browse files
committed
Deprecate the PostAuthor::getName() method
Cherry picks commit 2f54b9f from #1782
1 parent f389ef4 commit afbbb64

File tree

1 file changed

+5
-0
lines changed
  • packages/framework/src/Framework/Features/Blogging/Models

1 file changed

+5
-0
lines changed

packages/framework/src/Framework/Features/Blogging/Models/PostAuthor.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Hyde\Facades\Author;
99
use Hyde\Facades\Config;
1010
use Illuminate\Support\Collection;
11+
use JetBrains\PhpStorm\Deprecated;
1112

1213
use function strtolower;
1314
use function is_string;
@@ -85,6 +86,10 @@ public function __toString(): string
8586
return $this->getName();
8687
}
8788

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

0 commit comments

Comments
 (0)