Skip to content

Commit 0eb51e2

Browse files
committed
[Mailer] Fix an error message
1 parent 8b21225 commit 0eb51e2

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)