Skip to content

Commit c5fb3a2

Browse files
committed
use the parseFile() method of the YAML parser
1 parent 9a82931 commit c5fb3a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Mapping/Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected function parseNodes(array $nodes)
116116
private function parseFile($path)
117117
{
118118
try {
119-
$classes = $this->yamlParser->parse(file_get_contents($path), Yaml::PARSE_CONSTANT);
119+
$classes = $this->yamlParser->parseFile($path, Yaml::PARSE_CONSTANT);
120120
} catch (ParseException $e) {
121121
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e);
122122
}

0 commit comments

Comments
 (0)