Skip to content

Commit

Permalink
Fix AMQP exchange type topic option #65
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz authored Jun 24, 2024
2 parents 0013e1e + 2f07dc4 commit 0ee67d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
),
Expand Down
2 changes: 1 addition & 1 deletion src/Queue/AMQP/ExchangeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ee67d7

Please sign in to comment.