Skip to content

[ECP-9884] Fix the missing references in TransportBuilder class#3214

Merged
candemiralp merged 2 commits intomainfrom
ECP-9884
Jan 6, 2026
Merged

[ECP-9884] Fix the missing references in TransportBuilder class#3214
candemiralp merged 2 commits intomainfrom
ECP-9884

Conversation

@candemiralp
Copy link
Contributor

@candemiralp candemiralp commented Jan 6, 2026

Description

This PR fixes the missing references for the constants related to Mime class in TransportBuilder class. The required references have been removed as a part of Magento 2.4.8 backward incompatible changes. Therefore, they need to be replaced with the correct reference.

Fixes #3208

@candemiralp candemiralp requested a review from a team as a code owner January 6, 2026 15:13
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @candemiralp, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a backward incompatibility introduced in Magento 2.4.8 by updating the TransportBuilder class to use the correct Mime constant references. This change ensures that email attachment functionality continues to operate as expected by replacing outdated Laminas\Mime\Mime constants with their MimeInterface equivalents, and the corresponding unit tests have been adjusted to reflect this change.

Highlights

  • Dependency Update: The Laminas\Mime\Mime class import has been removed from Model/TransportBuilder.php.
  • Mime Constant References: References to Mime constants within the prepareAttachmentPart method in Model/TransportBuilder.php have been updated from Mime::* to MimeInterface::* to align with Magento 2.4.8 backward incompatible changes.
  • Unit Test Adjustment: The unit test Test/Unit/Model/TransportBuilderTest.php has been modified to remove the conditional markTestSkipped block that checked for the existence of the Laminas\Mime\Mime class, reflecting the updated dependency.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@candemiralp candemiralp added the Fix Indicates a bug fix label Jan 6, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly addresses a backward-incompatible change from Magento 2.4.8 by replacing deprecated constants from Laminas\Mime\Mime with the correct ones from Magento\Framework\Mail\MimeInterface in the TransportBuilder class. The changes are accurate and also include updating the unit test to remove the now-unnecessary dependency check. The implementation is clean and effectively resolves the issue. The code looks good, and I have no suggestions for improvement.

@candemiralp candemiralp merged commit 33a5d12 into main Jan 6, 2026
7 of 8 checks passed
@candemiralp candemiralp deleted the ECP-9884 branch January 6, 2026 15:49
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Indicates a bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ECP-9884][Bug]: Class "Laminas\Mime\Mime" not found.

3 participants