You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Mime] added Headers::toArray()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to 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
That helps when using the Mime component to create a form submission HTTP body (where you need to merge the headers of the MIME body with the HTTP headers):
```php
$body->getPreparedHeaders()->toArray();
vs
foreach ($body->getPreparedHeaders()->getAll() as $header) {
$headers[] = $header->toString();
}
```
Commits
-------
788bb81 [Mime] added Headers::toArray()
0 commit comments