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

[Mime] Deprecate Address::fromString() #37175

Merged
merged 1 commit into from Jun 9, 2020

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Jun 9, 2020

Q A
Branch? master
Bug fix? no
New feature? no
Deprecations? yes
Tickets n/a
License MIT
Doc PR n/a

Follow-up of #37167

@nicolas-grekas nicolas-grekas added this to the next milestone Jun 9, 2020
@fabpot fabpot force-pushed the mailer-fromString-deprec branch 3 times, most recently from 99f23ff to f8783ff Compare June 9, 2020 15:27
public static function fromString(string $string): self
{
trigger_deprecation('symfony/mime', '5.2', '"%s()" is deprecated, use "%s::create()" instead.', __METHOD__, __CLASS__);

if (false === strpos($string, '<')) {
return new self($string, '');
}

if (!preg_match(self::FROM_STRING_PATTERN, $string, $matches)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change this to call ::create instead of duplicating the logic ?

@fabpot fabpot merged commit c0831f9 into symfony:master Jun 9, 2020
@fabpot fabpot deleted the mailer-fromString-deprec branch June 9, 2020 16:19
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
@fabpot fabpot mentioned this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants