Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7a9c5da

Browse filesBrowse 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 ------- 60bb1c0 [Mailer] Fix an error message
2 parents f0c3c47 + 60bb1c0 commit 7a9c5da
Copy full SHA for 7a9c5da

File tree

2 files changed

+4
-4
lines changed
Filter options

2 files changed

+4
-4
lines changed

‎src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php
+2-2Lines 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
}

‎src/Symfony/Component/Mailer/Transport/Dsn.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Transport/Dsn.php
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.