You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Parser.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,10 @@ public function parse($value, $flags = 0)
86
86
}
87
87
}
88
88
89
+
if (Yaml::PARSE_KEYS_AS_STRINGS & $flags) {
90
+
@trigger_error('Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since version 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead.', E_USER_DEPRECATED);
91
+
}
92
+
89
93
if (false === preg_match('//u', $value)) {
90
94
thrownewParseException('The YAML value does not appear to be valid UTF-8.');
91
95
}
@@ -236,7 +240,7 @@ private function doParse($value, $flags)
236
240
throw$e;
237
241
}
238
242
239
-
if (!(Yaml::PARSE_KEYS_AS_STRINGS & $flags) && !is_string($key) && !is_int($key)) {
@trigger_error(sprintf('Implicit casting of %s to string is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead.', $keyType), E_USER_DEPRECATED);
@@ -739,11 +739,14 @@ public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expec
739
739
}
740
740
741
741
/**
742
+
* @group legacy
743
+
* @expectedDeprecation Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since version 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead.
744
+
* @expectedDeprecation Implicit casting of incompatible mapping keys to strings is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead.
Copy file name to clipboardExpand all lines: Tests/ParserTest.php
+23-29Lines changed: 23 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,8 @@ public function getDataFormSpecifications()
71
71
}
72
72
73
73
/**
74
+
* @group legacy
75
+
* @expectedDeprecationMessage Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since version 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable
* @expectedDeprecation Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since version 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead.
0 commit comments