From 3cb266d6e65a6af46bd6e01d23e28bf98b4a719e Mon Sep 17 00:00:00 2001 From: Nathan den Haan <00325393@rijnijssel.nl> Date: Thu, 5 Dec 2024 12:27:23 +0100 Subject: [PATCH] Fix exception formatting by calling array_keys() --- .../Doctrine/EventListener/PublishMercureUpdatesListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Doctrine/EventListener/PublishMercureUpdatesListener.php b/src/Symfony/Doctrine/EventListener/PublishMercureUpdatesListener.php index daa161caaa3..53bb7388e05 100644 --- a/src/Symfony/Doctrine/EventListener/PublishMercureUpdatesListener.php +++ b/src/Symfony/Doctrine/EventListener/PublishMercureUpdatesListener.php @@ -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)))); } }