1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Force YAML parser to convert keys to string

Since Symfony 3.3 implicit conversion is not enabled by default so we
need to pass that flag manually.

Related to: https://github.com/symfony/symfony/pull/21774
This commit is contained in:
Luís Cobucci 2017-05-30 12:53:07 +02:00
parent f18e178960
commit f9062d9931
No known key found for this signature in database
GPG Key ID: EC61C5F01750ED3C

View File

@ -800,6 +800,10 @@ class YamlDriver extends FileDriver
*/
protected function loadMappingFile($file)
{
if (defined(Yaml::class . '::PARSE_KEYS_AS_STRINGS')) {
return Yaml::parse(file_get_contents($file), Yaml::PARSE_KEYS_AS_STRINGS);
}
return Yaml::parse(file_get_contents($file));
}
}