Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Mime] deprecate attach/embed methods in favor of Email::addPart()#47711

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:6.2fromfabpot:mime-attach-embed-deprecation
Oct 15, 2022

Conversation

@fabpot
Copy link
Member

QA
Branch?6.2
Bug fix?no
New feature?no
Deprecations?yes
Ticketsn/a
LicenseMIT
Doc PR-

#47462 follow-up

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment
edited
Loading

Choose a reason for hiding this comment

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

Changelog entries missing :)

But I'm wondering: is it worth it? I mean: this will have an impact on all current users of the component, and will make it harder for bundles to provide compat with many versions at once (and be deprecation-free). Also, it's a bit longer to type and might be a bit harder to discover (embed() vs->asInline()). What's the issue with the current way of doing (and naming ;)) things ?

return'cid:'.$image;
}

publicfunctionattach(string$file,string$name =null,string$contentType =null):void

Choose a reason for hiding this comment

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

should be deprecated also I guess?

@fabpot
Copy link
MemberAuthor

As mentioned in the related PR, I'm not sure this is worth it either. That's just a proposal.
The current names are slightly wrong; that's why it might make sense to deprecate them.
But again, not 100% convinced.

@stof
Copy link
Member

To make it easier to support multiple versions, we might keep those names around for now, and deprecate them only in 7.1. As those methods are implemented as shortcuts on top of the new API, their maintenance cost is quite low.

However, if you expect to renameattachPart toaddPart as part of the deprecations, I would add the new name already.

@nicolas-grekas
Copy link
Member

Thanks for the insights. I'm "-0" personnaly: not worth the trouble pushed to the community IMHO.

@fabpot
Copy link
MemberAuthor

I would at least keep the removal of using these methods internally and I would advocate for adding the addPart() method to replace the attachPart one.

@fabpotfabpotforce-pushed themime-attach-embed-deprecation branch from0530036 to7cdbd20CompareOctober 15, 2022 06:31
@fabpot
Copy link
MemberAuthor

I've removed all deprecations but the one forattachPart() which is semantically wrong.

@fabpotfabpot merged commit0055d0f intosymfony:6.2Oct 15, 2022
@fabpotfabpot deleted the mime-attach-embed-deprecation branchOctober 15, 2022 09:47
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestOct 20, 2022
This PR was squashed before being merged into the 6.2 branch.Discussion----------Use `addPart` instead of `embed*` or `attach*`.Fixes#17303Ref#17353Refsymfony/symfony#47711Refsymfony/symfony#47462This PR contains the documentation for simplifications for adding parts to `Email`s.Commits-------ebbffc5 Use `addPart` instead of `embed*` or `attach*`.
@fabpotfabpot mentioned this pull requestOct 24, 2022
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestAug 28, 2023
This PR was squashed before being merged into the 6.3 branch.Discussion----------[Mailer] Fix attachment changesThe title ofsymfony/symfony#47711 did not change before merge, but actually only `attachPart` has been deprecated (renamed) in favor of `addPart`.I did not reintroduce the other methods as they may be deprecated in 7.1, so no need to document a way that may change in a few months.Also the `BodyFile` class has been renamed insymfony/symfony#48060 whereas the use in the example code was correct.Commits-------46923d0 [Mailer] Fix attachment changes
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

4 participants

@fabpot@stof@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp