Skip to content

Commit 9eb8fca

Browse files
committed
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
2 parents c04b20c + 0eb51e2 commit 9eb8fca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/Transport/DsnTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ public function invalidDsnProvider(): iterable
7777

7878
yield [
7979
'//sendmail',
80-
'The "//sendmail" mailer DSN must contain a transport scheme.',
80+
'The "//sendmail" mailer DSN must contain a scheme.',
8181
];
8282

8383
yield [
8484
'file:///some/path',
85-
'The "file:///some/path" mailer DSN must contain a mailer name.',
85+
'The "file:///some/path" mailer DSN must contain a host (use "default" by default).',
8686
];
8787
}
8888
}

Transport/Dsn.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public static function fromString(string $dsn): self
4242
}
4343

4444
if (!isset($parsedDsn['scheme'])) {
45-
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a transport scheme.', $dsn));
45+
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a scheme.', $dsn));
4646
}
4747

4848
if (!isset($parsedDsn['host'])) {
49-
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a mailer name.', $dsn));
49+
throw new InvalidArgumentException(sprintf('The "%s" mailer DSN must contain a host (use "default" by default).', $dsn));
5050
}
5151

5252
$user = isset($parsedDsn['user']) ? urldecode($parsedDsn['user']) : null;

0 commit comments

Comments
 (0)