Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Symfony/Component/Mailer/Tests/Transport/DsnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ public function invalidDsnProvider(): iterable

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).',
];
}
}
4 changes: 2 additions & 2 deletions src/Symfony/Component/Mailer/Transport/Dsn.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public static function fromString(string $dsn): self
}

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;
Expand Down