Skip to content

Commit

Permalink
fix(symfony): mercure exception formatting by calling array_keys() (#…
Browse files Browse the repository at this point in the history
…6879)

Co-authored-by: Nathan den Haan <[email protected]>
  • Loading branch information
soyuka and nathan-d-h authored Dec 20, 2024
1 parent 535bbf5 commit 2ee5eb4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private function storeObjectToPublish(object $object, string $property): void

foreach ($options as $key => $value) {
if (!isset(self::ALLOWED_KEYS[$key])) {
throw new InvalidArgumentException(\sprintf('The option "%s" set in the "mercure" attribute of the "%s" resource does not exist. Existing options: "%s"', $key, $resourceClass, implode('", "', self::ALLOWED_KEYS)));
throw new InvalidArgumentException(\sprintf('The option "%s" set in the "mercure" attribute of the "%s" resource does not exist. Existing options: "%s"', $key, $resourceClass, implode('", "', array_keys(self::ALLOWED_KEYS))));
}
}

Expand Down

0 comments on commit 2ee5eb4

Please sign in to comment.