Skip to content

[Mime] Add Address::fromString #33091

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

Merged
merged 1 commit into from
Aug 22, 2019

Conversation

gisostallenberg
Copy link
Contributor

@gisostallenberg gisostallenberg commented Aug 9, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #33086
License MIT
Doc PR symfony/symfony-docs#12128

This will allow to create a Address from a string such as 'Name name@example.com'
Example:

$address = Address::fromString("Name <name@example.com>");

@s0h1s2
Copy link

s0h1s2 commented Aug 9, 2019

can you explain it? how the feature should work

@gisostallenberg
Copy link
Contributor Author

@Shkarsardar see symfony/symfony-docs#12128

@Tobion Tobion added the Mime label Aug 9, 2019
@chalasr chalasr added this to the next milestone Aug 9, 2019
@nicolas-grekas nicolas-grekas changed the title Add NamedAddress::fromString [Mime] Add NamedAddress::fromString Aug 11, 2019
@gisostallenberg
Copy link
Contributor Author

Thanks so much for all the effort you put in checking this.

fabpot added a commit that referenced this pull request Aug 21, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Remove NamedAddress

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | yes     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

While working on #33091, we realize that having both `NamedAddress` and `Address` brings some unneeded complexity. Initially, I added both as some headers do not support `NamedAddress`es. But the code already does the right thing by "downgrading" them to `Address` instances. So, let's simplify our internal code and make life easier for our users too.

Commits
-------

eb7d74e [Mime] Remove NamedAddress
@fabpot
Copy link
Member

fabpot commented Aug 21, 2019

@gisostallenberg Can you rebase as #33270 has been merged now?

@gisostallenberg gisostallenberg changed the title [Mime] Add NamedAddress::fromString [Mime] Add Address::fromString Aug 22, 2019
@gisostallenberg gisostallenberg force-pushed the mime-named-address-from-string branch 2 times, most recently from 1faab70 to 7c82c07 Compare August 22, 2019 09:09
This will allow to create an Address from a string such as 'Name <name@example.com>'
@gisostallenberg gisostallenberg force-pushed the mime-named-address-from-string branch from 7c82c07 to 75ea8d0 Compare August 22, 2019 09:11
@fabpot
Copy link
Member

fabpot commented Aug 22, 2019

Thank you @gisostallenberg.

fabpot added a commit that referenced this pull request Aug 22, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Add Address::fromString

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33086
| License       | MIT
| Doc PR        | symfony/symfony-docs#12128

This will allow to create a Address from a string such as 'Name <name@example.com>'
Example:
```php
$address = Address::fromString("Name <name@example.com>");
```

Commits
-------

75ea8d0 Add Address::fromString
@fabpot fabpot merged commit 75ea8d0 into symfony:4.4 Aug 22, 2019
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 2019
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.

10 participants