Skip to content

Commit a3db287

Browse files
Remove full DSNs from exception messages
1 parent b28a1f3 commit a3db287

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Tests/Transport/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ConnectionTest extends TestCase
3030
public function testItCannotBeConstructedWithAWrongDsn()
3131
{
3232
$this->expectException(\InvalidArgumentException::class);
33-
$this->expectExceptionMessage('The given AMQP DSN "amqp://:" is invalid.');
33+
$this->expectExceptionMessage('The given AMQP DSN is invalid.');
3434
Connection::fromDsn('amqp://:');
3535
}
3636

Transport/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public static function fromDsn(#[\SensitiveParameter] string $dsn, array $option
165165
if (false === $parsedUrl = parse_url($dsn)) {
166166
// this is a valid URI that parse_url cannot handle when you want to pass all parameters as options
167167
if (!\in_array($dsn, ['amqp://', 'amqps://'])) {
168-
throw new InvalidArgumentException(sprintf('The given AMQP DSN "%s" is invalid.', $dsn));
168+
throw new InvalidArgumentException('The given AMQP DSN is invalid.');
169169
}
170170

171171
$parsedUrl = [];

0 commit comments

Comments
 (0)