Skip to content

Commit fbfa507

Browse files
committed
Deprecate the Author::create method's $username parameter
This leads to duplication which gets confusing
1 parent fb12b6b commit fbfa507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/framework/src/Facades/Author.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Hyde\Facades;
66

7+
use JetBrains\PhpStorm\Deprecated;
78
use Hyde\Framework\Features\Blogging\Models\PostAuthor;
89
use Illuminate\Support\Collection;
910

@@ -24,7 +25,7 @@ class Author
2425
* @param string|null $name The optional display name of the author, leave blank to use the username.
2526
* @param string|null $website The author's optional website URL. Website, Twitter, etc.
2627
*/
27-
public static function create(string $username, ?string $name = null, ?string $website = null): PostAuthor
28+
public static function create(#[Deprecated]string $username, ?string $name = null, ?string $website = null): PostAuthor
2829
{
2930
return new PostAuthor($username, $name, $website);
3031
}

0 commit comments

Comments
 (0)