Skip to content

Commit 3fbbb23

Browse files
committed
Resolve code review comments from stof and oska
Also fix one mysteriously broken unit test.
1 parent 8597c1e commit 3fbbb23

File tree

5 files changed

+5
-8
lines changed

5 files changed

+5
-8
lines changed

src/Symfony/Component/Mailer/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CHANGELOG
55
---
66

77
* Make `TransportFactoryTestCase` compatible with PHPUnit 10+
8-
* Support unicode email addresses such as "dømi@dømi.fo", no client changes needed
8+
* Support unicode email addresses such as "dømi@dømi.fo"
99

1010
7.1
1111
---

src/Symfony/Component/Mailer/Envelope.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public function getRecipients(): array
8383
}
8484

8585
/**
86-
8786
* Returns true if any address' localpart contains at least one
8887
* non-ASCII character, and false if all addresses have all-ASCII
8988
* localparts.
@@ -97,8 +96,6 @@ public function getRecipients(): array
9796
* then it is possible to to send the message using IDN encoding
9897
* instead of SMTPUTF8. The most common software will display the
9998
* message as intended.
100-
*
101-
* @return bool
10299
*/
103100
public function anyAddressHasUnicodeLocalpart(): bool
104101
{

src/Symfony/Component/Mailer/Transport/Smtp/EsmtpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private function parseCapabilities(string $ehloResponse): array
195195
return $capabilities;
196196
}
197197

198-
protected function serverSupportsSmtputf8(): bool
198+
protected function serverSupportsSmtpUtf8(): bool
199199
{
200200
return \array_key_exists('SMTPUTF8', $this->capabilities);
201201
}

src/Symfony/Component/Mailer/Transport/Smtp/SmtpTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ protected function doSend(SentMessage $message): void
245245
}
246246
}
247247

248-
protected function serverSupportsSmtputf8(): bool
248+
protected function serverSupportsSmtpUtf8(): bool
249249
{
250250
return false;
251251
}
@@ -257,7 +257,7 @@ private function doHeloCommand(): void
257257

258258
private function doMailFromCommand(string $address, bool $smtputf8): void
259259
{
260-
if($smtputf8 && !$this->serverSupportsSmtputf8()) {
260+
if($smtputf8 && !$this->serverSupportsSmtpUtf8()) {
261261
throw new InvalidArgumentException('Invalid addresses: non-ASCII characters not supported in local-part of email.');
262262
}
263263
$this->executeCommand(sprintf("MAIL FROM:<%s>%s\r\n", $address, ($smtputf8 ? " SMTPUTF8" : "")), [250]);

src/Symfony/Component/Mime/Tests/AddressTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function testUnicodeLocalpart()
8585
{
8686
/* dømi means example and is reserved by the .fo registry */
8787
$this->assertFalse((new Address('info@dømi.fo'))->hasUnicodeLocalpart());
88-
$this->assertTrue((new Address('info@dømi.fo'))->hasUnicodeLocalpart());
88+
$this->assertTrue((new Address('dømi@dømi.fo'))->hasUnicodeLocalpart());
8989
}
9090

9191
public function testCreateArrayWrongArg()

0 commit comments

Comments
 (0)