Skip to content

Commit 39bdf55

Browse files
Remove full DSNs from exception messages
1 parent cfc7a00 commit 39bdf55

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 @@ final class ConnectionTest extends TestCase
3030
public function testFromInvalidDsn()
3131
{
3232
$this->expectException(\InvalidArgumentException::class);
33-
$this->expectExceptionMessage('The given Beanstalkd DSN "beanstalkd://" is invalid.');
33+
$this->expectExceptionMessage('The given Beanstalkd DSN is invalid.');
3434

3535
Connection::fromDsn('beanstalkd://');
3636
}

Transport/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(array $configuration, PheanstalkInterface $client)
5959
public static function fromDsn(string $dsn, array $options = []): self
6060
{
6161
if (false === $components = parse_url($dsn)) {
62-
throw new InvalidArgumentException(sprintf('The given Beanstalkd DSN "%s" is invalid.', $dsn));
62+
throw new InvalidArgumentException('The given Beanstalkd DSN is invalid.');
6363
}
6464

6565
$connectionCredentials = [

0 commit comments

Comments
 (0)