From e714f03368447b1da808b696882b42cd03368516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20P=C3=A9lisset?= Date: Sun, 20 Aug 2023 20:02:50 +0200 Subject: [PATCH] Use the same Parser flags as in Symfony (#49) --- src/Service/CodeValidator/YamlValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/CodeValidator/YamlValidator.php b/src/Service/CodeValidator/YamlValidator.php index d98183d..890e760 100644 --- a/src/Service/CodeValidator/YamlValidator.php +++ b/src/Service/CodeValidator/YamlValidator.php @@ -19,7 +19,7 @@ public function validate(CodeNode $node, IssueCollection $issues): void // Allow us to use "..." as a placeholder $contents = str_replace('...', 'null', $node->getValue()); try { - Yaml::parse($contents, Yaml::PARSE_CUSTOM_TAGS); + Yaml::parse($contents, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS); } catch (ParseException $e) { if ('Duplicate key' === substr($e->getMessage(), 0, 13)) { return;