[Serializer] Parse PHP constants in YAML mappings

This commit is contained in:
Gabriel Ostrolucký 2017-12-03 23:37:47 +01:00
parent a603ba0bee
commit b82f301b05

View File

@ -15,6 +15,7 @@ use Symfony\Component\Serializer\Exception\MappingException;
use Symfony\Component\Serializer\Mapping\AttributeMetadata;
use Symfony\Component\Serializer\Mapping\ClassMetadataInterface;
use Symfony\Component\Yaml\Parser;
use Symfony\Component\Yaml\Yaml;
/**
* YAML File Loader.
@ -113,7 +114,7 @@ class YamlFileLoader extends FileLoader
$this->yamlParser = new Parser();
}
$classes = $this->yamlParser->parseFile($this->file);
$classes = $this->yamlParser->parseFile($this->file, Yaml::PARSE_CONSTANT);
if (empty($classes)) {
return array();