Skip to content

Commit

Permalink
Merge branch '4.4' into 5.0
Browse files Browse the repository at this point in the history
* 4.4:
  Add missing dots at the end of exception messages
  [DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
  Fix bad merge
  Add missing dots at the end of exception messages
  • Loading branch information
fabpot committed Mar 15, 2020
2 parents aa183f0 + a907483 commit bc2b966
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion RoutableMessageBus.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(ContainerInterface $busLocator, MessageBusInterface
public function dispatch($envelope, array $stamps = []): Envelope
{
if (!$envelope instanceof Envelope) {
throw new InvalidArgumentException('Messages passed to RoutableMessageBus::dispatch() must be inside an Envelope');
throw new InvalidArgumentException('Messages passed to RoutableMessageBus::dispatch() must be inside an Envelope.');
}

/** @var BusNameStamp|null $busNameStamp */
Expand Down
2 changes: 1 addition & 1 deletion Transport/AmqpExt/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function channel(): \AMQPChannel
$credentials['password'] = '********';
unset($credentials['delay']);

throw new \AMQPException(sprintf('Could not connect to the AMQP server. Please verify the provided DSN. (%s)', json_encode($credentials)), 0, $e);
throw new \AMQPException(sprintf('Could not connect to the AMQP server. Please verify the provided DSN. (%s).', json_encode($credentials)), 0, $e);
}
$this->amqpChannel = $this->amqpFactory->createChannel($connection);

Expand Down
4 changes: 2 additions & 2 deletions Transport/Doctrine/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ public static function buildConfiguration(string $dsn, array $options = []): arr
// check for extra keys in options
$optionsExtraKeys = array_diff(array_keys($options), array_keys(self::DEFAULT_OPTIONS));
if (0 < \count($optionsExtraKeys)) {
throw new InvalidArgumentException(sprintf('Unknown option found : [%s]. Allowed options are [%s]', implode(', ', $optionsExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS))));
throw new InvalidArgumentException(sprintf('Unknown option found : [%s]. Allowed options are [%s].', implode(', ', $optionsExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS))));
}

// check for extra keys in options
$queryExtraKeys = array_diff(array_keys($query), array_keys(self::DEFAULT_OPTIONS));
if (0 < \count($queryExtraKeys)) {
throw new InvalidArgumentException(sprintf('Unknown option found in DSN: [%s]. Allowed options are [%s]', implode(', ', $queryExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS))));
throw new InvalidArgumentException(sprintf('Unknown option found in DSN: [%s]. Allowed options are [%s].', implode(', ', $queryExtraKeys), implode(', ', array_keys(self::DEFAULT_OPTIONS))));
}

return $configuration;
Expand Down
4 changes: 2 additions & 2 deletions Transport/RedisExt/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public function __construct(array $configuration, array $connectionCredentials =
$this->connection->setOption(\Redis::OPT_SERIALIZER, $redisOptions['serializer'] ?? \Redis::SERIALIZER_PHP);

if (isset($connectionCredentials['auth']) && !$this->connection->auth($connectionCredentials['auth'])) {
throw new InvalidArgumentException(sprintf('Redis connection failed: %s', $redis->getLastError()));
throw new InvalidArgumentException(sprintf('Redis connection failed: %s.', $redis->getLastError()));
}

if (($dbIndex = $configuration['dbindex'] ?? self::DEFAULT_OPTIONS['dbindex']) && !$this->connection->select($dbIndex)) {
throw new InvalidArgumentException(sprintf('Redis connection failed: %s', $redis->getLastError()));
throw new InvalidArgumentException(sprintf('Redis connection failed: %s.', $redis->getLastError()));
}

$this->stream = $configuration['stream'] ?? self::DEFAULT_OPTIONS['stream'];
Expand Down

0 comments on commit bc2b966

Please sign in to comment.