Skip to content

Commit 2f54b9f

Browse files
committed
Deprecate the PostAuthor::getName() method
This is not needed as the name property can be accessed directly
1 parent 1baa0c3 commit 2f54b9f

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 Stringable;
99
use Hyde\Facades\Author;
1010
use Illuminate\Support\Collection;
11+
use JetBrains\PhpStorm\Deprecated;
1112
use Hyde\Support\Concerns\Serializable;
1213
use Hyde\Support\Contracts\SerializableContract;
1314

@@ -126,6 +127,10 @@ public function toArray(): array
126127
]);
127128
}
128129

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

0 commit comments

Comments
 (0)