Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[11.x] Use Str::wrap() instead of nesting Str::start() inside Str::finish()" #54528

Merged
merged 3 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Illuminate/Mail/Mailables/Headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function text(array $text)
public function referencesString(): string
{
return (new Collection($this->references))
->map(fn ($messageId) => Str::wrap($messageId, '<', '>'))
->map(fn ($messageId) => Str::of($messageId)->start('<')->finish('>')->value())
->implode(' ');
}
}
27 changes: 27 additions & 0 deletions tests/Mail/MailMailableHeadersTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace Illuminate\Tests\Mail;

use Illuminate\Mail\Mailables\Headers;
use PHPUnit\Framework\TestCase;

class MailMailableHeadersTest extends TestCase
{
public function test()
{
$headers = new Headers(
'[email protected]',
[
'<[email protected]>',
'<[email protected]>',
'<[email protected]>',
'<[email protected]>',
],
);

$this->assertSame(
'<[email protected]> <[email protected]> <[email protected]> <[email protected]>',
$headers->referencesString(),
);
}
}