Skip to content

Commit

Permalink
Merge pull request #14239 from craftcms/feature/cms-1069-yii2-symfony…
Browse files Browse the repository at this point in the history
…mailer-v3

Upgrade yiisoft/yii2-symfonymailer
  • Loading branch information
brandonkelly authored Jan 30, 2024
2 parents bfff9cf + 946a13b commit 82e0a31
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 84 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@
- Deprecated the `_elements/element.twig` control panel template. `elementChip()` or `elementCard()` should be used instead.
- Deprecated the `cp.elements.element` control panel template hook.
- Removed the `_includes/revisionmenu.twig` control panel template.
- Removed `\craft\mail\transportadapters\Gmail::$timeout`.
- Removed `\craft\mail\transportadapters\Smtp::$encryptionMethod`.
- Removed `\craft\mail\transportadapters\Smtp::$timeout`.
- Removed `craft\base\ApplicationTrait::getMatrix()`.
- Removed `craft\base\Element::$contentId`.
- Removed `craft\base\Element::ATTR_STATUS_MODIFIED`. `craft\enums\AttributeStatus::Modified` should be used instead.
Expand Down Expand Up @@ -569,6 +572,7 @@
- Craft now requires `pragmarx/recovery`.
- Craft now requires `web-auth/webauthn-lib`.
- Updated `illuminate/collections` to v10.
- Updated `yiisoft/yii2-symfonymailer` to v4.
- Craft no longer requires `composer/composer`.
- New database tables now default to the `utf8mb4` charset, and the `utf8mb4_0900_ai_ci` or `utf8mb4_unicode_ci` collation, on MySQL. Existing installs should run `db/convert-charset` after upgrading, to ensure all tables have consistent charsets and collations. ([#11823](https://github.com/craftcms/cms/discussions/11823))
- The `defaultTemplateExtensions` config setting now lists `twig` before `html` by default. ([#11809](https://github.com/craftcms/cms/discussions/11809))
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
- Added the `languageMenu` and `languageMenuField` form macros.
- Added `craft\models\Site::getLanguage()`.
- Added `craft\models\Site::setLanguage()`.
- Removed `\craft\mail\transportadapters\Gmail::$timeout`.
- Removed `\craft\mail\transportadapters\Smtp::$encryptionMethod`.
- Removed `\craft\mail\transportadapters\Smtp::$timeout`.
- Updated `yiisoft/yii2-symfonymailer` to v4.

## 5.0.0-alpha.9 - 2024-01-29

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"yiisoft/yii2": "~2.0.48.1",
"yiisoft/yii2-debug": "~2.1.22.0",
"yiisoft/yii2-queue": "~2.3.2",
"yiisoft/yii2-symfonymailer": "^2.0.0"
"yiisoft/yii2-symfonymailer": "^4.0.0"
},
"require-dev": {
"codeception/codeception": "^5.0.11",
Expand Down
126 changes: 69 additions & 57 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/helpers/MailerHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ public static function normalizeEmails(mixed $emails): array
*/
public static function settingsReport(Mailer $mailer, ?TransportAdapterInterface $transportAdapter = null): string
{
$transport = $mailer->getTransport();
$transportType = $transportAdapter ? get_class($transportAdapter) : App::mailSettings()->transportType;
$settings = [
Craft::t('app', 'From') => self::_emailList($mailer->from),
Craft::t('app', 'Reply To') => self::_emailList($mailer->replyTo),
Craft::t('app', 'Template') => $mailer->template,
Craft::t('app', 'Transport Type') => get_class($transport),
Craft::t('app', 'Transport Type') => $transportType,
];

$transportSettings = [];
Expand Down
Loading

0 comments on commit 82e0a31

Please sign in to comment.