diff --git a/src/Jobs.php b/src/Jobs.php index b541581..1698c8b 100644 --- a/src/Jobs.php +++ b/src/Jobs.php @@ -123,7 +123,7 @@ private function toStringOfStringMap(array $map): array \is_string($value) => $value, \is_bool($value) => $value ? 'true' : 'false', $value instanceof \JsonSerializable, - \is_array($value) => \json_encode($value, \JSON_THROW_ON_ERROR), + \is_array($value) => \json_encode($value, \JSON_THROW_ON_ERROR | (empty($value)? \JSON_FORCE_OBJECT : 0)), default => throw new \InvalidArgumentException( \sprintf('Can not cast to string unrecognized value of type %s', \get_debug_type($value)), ), diff --git a/src/Queue/AMQP/ExchangeType.php b/src/Queue/AMQP/ExchangeType.php index 4a1cea5..53d02ef 100644 --- a/src/Queue/AMQP/ExchangeType.php +++ b/src/Queue/AMQP/ExchangeType.php @@ -22,7 +22,7 @@ enum ExchangeType: string * routing by comparing the routing key. But, in this case, the key is set * using a template, like "user.*.messages". */ - case Topics = 'topics'; + case Topics = 'topic'; /** * Routes tasks to related queues based on a comparison of the (key, value)