Skip to content

[Mime] Support custom encoders in mime parts #54975

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
May 31, 2024

Conversation

KDederichs
Copy link
Contributor

@KDederichs KDederichs commented May 17, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #54973
License MIT

Allow adding custom encoders to Text Parts

@carsonbot carsonbot added this to the 7.1 milestone May 17, 2024
@KDederichs KDederichs force-pushed the feat/custom_mime_encoders branch from a4bf114 to 620d561 Compare May 17, 2024 15:15
@derrabus derrabus added the Mime label May 17, 2024
@carsonbot carsonbot changed the title feat: support custom encoders in mime parts [Mime] feat: support custom encoders in mime parts May 17, 2024
@KDederichs
Copy link
Contributor Author

Dunno, those test failures look not related and kind of random?

@KDederichs
Copy link
Contributor Author

Also can this still be squeezed into 7.1 or do we have feature freeze since we got RC1 now? (I kind of really need this :D)

@derrabus
Copy link
Member

derrabus commented May 17, 2024

We have feature freeze for over two weeks already. I see no reason to make an exception here, sorry.

@derrabus derrabus modified the milestones: 7.1, 7.2 May 17, 2024
@KDederichs
Copy link
Contributor Author

Ah too bad, guess I'll copy stuff around till 7.2 then

@derrabus
Copy link
Member

Ah too bad, guess I'll copy stuff around till 7.2 then

Yeah, too bad that Composer cannot install dev snapshots. Oh wait.

@KDederichs KDederichs force-pushed the feat/custom_mime_encoders branch 2 times, most recently from f2c55db to 1af7ac2 Compare May 18, 2024 11:12
@KDederichs KDederichs requested a review from derrabus May 18, 2024 11:50
if ('quoted-printable' !== $encoding && 'base64' !== $encoding && '8bit' !== $encoding) {
throw new InvalidArgumentException(sprintf('The encoding must be one of "quoted-printable", "base64", or "8bit" ("%s" given).', $encoding));
if (!\in_array($encoding, self::DEFAULT_ENCODERS) && !\array_key_exists($encoding, self::$encoders)) {
throw new InvalidArgumentException('The encoding must be one of "quoted-printable", "base64", or "8bit". In case you are trying to use a custom encoder, please add it first.');
Copy link
Member

Choose a reason for hiding this comment

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

Shall we just list all available encodings? I don't think the second sentence is necessary then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, sounds good.
I'll change it.

@KDederichs KDederichs force-pushed the feat/custom_mime_encoders branch from 1af7ac2 to 7d7e072 Compare May 21, 2024 09:50
@KDederichs KDederichs requested a review from derrabus May 21, 2024 09:54
@derrabus derrabus changed the title [Mime] feat: support custom encoders in mime parts [Mime] Support custom encoders in mime parts May 21, 2024
@fabpot
Copy link
Member

fabpot commented May 31, 2024

Thank you @KDederichs.

@fabpot fabpot merged commit 838ff87 into symfony:7.2 May 31, 2024
5 of 10 checks passed
@fabpot fabpot mentioned this pull request Oct 27, 2024
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.

[Mime] Allow custom encoders for parts
4 participants