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

[TwigBridge] Allow attachment name to be set for inline images#60163

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
nicolas-grekas merged 1 commit intosymfony:7.3fromaleho:7.3
Apr 16, 2025

Conversation

aleho
Copy link
Contributor

QA
Branch?7.3
Bug fix?no
New feature?yes
Deprecations?no
LicenseMIT

Using a recommended setup attaching images from Twig would normally result in attachment names like@assets/img/file.png which might not be a good file name to expose to email clients. This allows the name to be specified, analogous toattach in the same wrapper.

selhabibe reacted with thumbs up emoji
@carsonbotcarsonbot added this to the7.3 milestoneApr 7, 2025
@carsonbotcarsonbot changed the title[Twig Bridge][Mime] Allow attachment name to be set for inline images[Mime] [Twig Bridge] Allow attachment name to be set for inline imagesApr 7, 2025
@OskarStarkOskarStark changed the title[Mime] [Twig Bridge] Allow attachment name to be set for inline images[Mime][Twig Bridge] Allow attachment name to be set for inline imagesApr 7, 2025
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

How can this be tested?

@aleho
Copy link
ContributorAuthor

aleho commentedApr 8, 2025
edited
Loading

@nicolas-grekas I could write a test case forWrappedTemplatedEmail and trigger all the HTML handling like sending it. That would need a template and small image for tests. I'd only start if that's OK for you because I don't want to throw away that work.

@nicolas-grekas
Copy link
Member

The proposal looks good to me. I'd say it just misses some tests + a line in the CHANGELOG file of the bridge.

aleho reacted with thumbs up emoji

@alehoaleho changed the title[Mime][Twig Bridge] Allow attachment name to be set for inline images[Twig Bridge][Mime] Allow attachment name to be set for inline imagesApr 11, 2025
@alehoalehoforce-pushed the7.3 branch 2 times, most recently fromf7281a8 toeda234aCompareApril 11, 2025 07:25
@aleho
Copy link
ContributorAuthor

@nicolas-grekas I'm not too happy with hard-coding the strings to test like that because of how line breaks are handled, but I guess the intention is clear and they should be easy to maintain if something changes.

The Doctrine tests failing are hopefully not related to my changes?

@nicolas-grekasnicolas-grekas changed the title[Twig Bridge][Mime] Allow attachment name to be set for inline images[TwigBridge][Mime] Allow attachment name to be set for inline imagesApr 16, 2025
@carsonbotcarsonbot changed the title[TwigBridge][Mime] Allow attachment name to be set for inline images[TwigBridge] Allow attachment name to be set for inline imagesApr 16, 2025
@nicolas-grekas
Copy link
Member

Thank you@aleho.

aleho reacted with heart emoji

@nicolas-grekasnicolas-grekas merged commit01c26aa intosymfony:7.3Apr 16, 2025
7 of 11 checks passed
@fabpotfabpot mentioned this pull requestMay 2, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

3 participants
@aleho@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp