[11.x] Set smtp as default scheme which is in the supported schemes list from Symfony Mailer #53705
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #53704
Description:
This pull request addresses an issue introduced by Symfony Mailer 7.2.0, where the UnsupportedSchemeException is thrown if the specified scheme is not explicitly set to smtp or smtps. Currently, MailManager::createSmtpTransport sets the scheme to an empty string ("") by default, which is no longer supported.
The change ensures the default scheme is explicitly set to smtp to maintain compatibility with Symfony Mailer 7.2.0 and prevent runtime errors.
Relevant Change in Symfony Mailer:
symfony/mailer@v7.1.6...v7.2.0#diff-034fdf635bc919f1ba58fb3cac83ce59f111a73c1ee72d63055f752c4b3668dd
Steps to Reproduce:
Benefit to End Users:
This fix ensures that users leveraging the smtp transport in Laravel's mail configuration do not encounter errors after updating their dependencies. It provides a seamless experience and prevents breaking changes when using Symfony Mailer 7.2.0+.
Impact on Existing Features:
This change does not break any existing features or functionality. It simply ensures compatibility with the latest Symfony Mailer updates.