Skip to content

Commit

Permalink
Remove full DSNs from exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Nov 3, 2023
1 parent cfc7a00 commit 39bdf55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/Transport/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ final class ConnectionTest extends TestCase
public function testFromInvalidDsn()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('The given Beanstalkd DSN "beanstalkd://" is invalid.');
$this->expectExceptionMessage('The given Beanstalkd DSN is invalid.');

Connection::fromDsn('beanstalkd://');
}
Expand Down
2 changes: 1 addition & 1 deletion Transport/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(array $configuration, PheanstalkInterface $client)
public static function fromDsn(string $dsn, array $options = []): self
{
if (false === $components = parse_url($dsn)) {
throw new InvalidArgumentException(sprintf('The given Beanstalkd DSN "%s" is invalid.', $dsn));
throw new InvalidArgumentException('The given Beanstalkd DSN is invalid.');
}

$connectionCredentials = [
Expand Down

0 comments on commit 39bdf55

Please sign in to comment.