Skip to content

Commit

Permalink
Version 2.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhirtz committed Mar 11, 2024
1 parent 3de12cb commit 6e90f69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 2.2.4 (under development)
## 2.2.4 (Mar 11, 2024)

- Added mailer transport DSN fallback (Issues #24)
- Added support for `color` type input fields (Issue #22)
Expand Down
7 changes: 5 additions & 2 deletions src/base/traits/ApplicationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,11 @@ protected function preInitInternal(&$config): void
$config['components']['db'] = array_merge(require ($db), $config['components']['db']);
}

// Mailer transport DSN might need to be set via params (eg. yii2-config module)
$config['components']['mailer']['transport']['dsn'] ??= $config['params']['mailerDsn'] ?? 'sendmail://default';
// Mailer transport DSN might need to be set via params (e.g., `yii2-config` module), but only set it if
// `useFileTransport` is not active.
if (!($config['components']['mailer']['useFileTransport'] ?? false)) {
$config['components']['mailer']['transport']['dsn'] = $config['params']['mailerDsn'] ?? 'sendmail://default';
}

// Make sure the cache prefix via params is applied before application bootstrap, as a DB session might get
// started which could trigger the database schema cache.
Expand Down

0 comments on commit 6e90f69

Please sign in to comment.