Skip to content

[12.x] Do not assume Str::uuid() returns Stringable#57340

Merged
taylorotwell merged 1 commit into
laravel:12.xfrom
cosmastech:string-casting
Oct 10, 2025
Merged

[12.x] Do not assume Str::uuid() returns Stringable#57340
taylorotwell merged 1 commit into
laravel:12.xfrom
cosmastech:string-casting

Conversation

@cosmastech

@cosmastech cosmastech commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

To close #57328

Most of the places within the app use (string) Str::uuid(). While there are now typehints on Str::createUuidUsing(), they are just docblocks and cannot be strictly enforced.

Now users who want to leverage NotificationFake in conjunction with Str::createUuidsUsing(fn () => 'dis-my-uuid-tho') can.

@cosmastech cosmastech changed the title [12.x] do not assume Str::uuid() returns Stringable [12.x] Do not assume Str::uuid() returns Stringable Oct 10, 2025
@taylorotwell taylorotwell merged commit 7baabc9 into laravel:12.x Oct 10, 2025
66 checks passed
@cosmastech cosmastech deleted the string-casting branch January 24, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use Str::createUuidsUsing() with Notification::fake()

2 participants