Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5b719d1

Browse filesBrowse files
committed
bug #37167 [Mime] use fromString when creating a new Address (fabpot)
This PR was merged into the 4.4 branch. Discussion ---------- [Mime] use fromString when creating a new Address | Q | A | ------------- | --- | Branch? | 4.4 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | n/a When creating an Address, there are two ways right now in 4.4: `Address::create()` which takes an email or an instance of Address and `Address::fromString()` which takes an email or an email+name. In 4.4, I propose to make `create` supports everything possible. And in 5.2, I will probably propose to deprecate `fromString()`. Commits ------- de68787 [Mime] use fromString when creating a new Adress
2 parents 749380a + de68787 commit 5b719d1
Copy full SHA for 5b719d1

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/Mime/Address.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mime/Address.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static function create($address): self
8989
return $address;
9090
}
9191
if (\is_string($address)) {
92-
return new self($address);
92+
return self::fromString($address);
9393
}
9494

9595
throw new InvalidArgumentException(sprintf('An address can be an instance of Address or a string ("%s") given).', \is_object($address) ? \get_class($address) : \gettype($address)));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.