minor #33463 [Mailer] Fix an error message (fabpot)
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Fix an error message
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Now that the host is not the name anymore, the error message when not having a host is wrong.
Commits
-------
60bb1c0ddc
[Mailer] Fix an error message
This commit is contained in:
commit
7a9c5da1de
@ -77,12 +77,12 @@ class DsnTest extends TestCase
|
||||
|
||||
yield [
|
||||
'//sendmail',
|
||||
'The "//sendmail" mailer DSN must contain a transport scheme.',
|
||||
'The "//sendmail" mailer DSN must contain a scheme.',
|
||||
];
|
||||
|
||||
yield [
|
||||
'file:///some/path',
|
||||
'The "file:///some/path" mailer DSN must contain a mailer name.',
|
||||
'The "file:///some/path" mailer DSN must contain a host (use "default" by default).',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -42,11 +42,11 @@ final class Dsn
|
||||
}
|
||||
|
||||
if (!isset($parsedDsn['scheme'])) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a transport scheme.', $dsn));
|
||||
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a scheme.', $dsn));
|
||||
}
|
||||
|
||||
if (!isset($parsedDsn['host'])) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a mailer name.', $dsn));
|
||||
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a host (use "default" by default).', $dsn));
|
||||
}
|
||||
|
||||
$user = isset($parsedDsn['user']) ? urldecode($parsedDsn['user']) : null;
|
||||
|
Reference in New Issue
Block a user