Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8bf465f

Browse filesBrowse files
committed
use the parseFile() method of the YAML parser
1 parent 1b4d2b2 commit 8bf465f
Copy full SHA for 8bf465f

File tree

Expand file treeCollapse file tree

7 files changed

+9
-9
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+9
-9
lines changed

‎src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ protected function loadFile($file)
654654
}
655655

656656
try {
657-
$configuration = $this->yamlParser->parse(file_get_contents($file), Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS);
657+
$configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS);
658658
} catch (ParseException $e) {
659659
throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $file), 0, $e);
660660
}

‎src/Symfony/Component/Routing/Loader/YamlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Loader/YamlFileLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function load($file, $type = null)
5858
}
5959

6060
try {
61-
$parsedConfig = $this->yamlParser->parse(file_get_contents($path));
61+
$parsedConfig = $this->yamlParser->parseFile($path);
6262
} catch (ParseException $e) {
6363
throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e);
6464
}

‎src/Symfony/Component/Routing/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/composer.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"require-dev": {
2222
"symfony/config": "~2.8|~3.0|~4.0",
2323
"symfony/http-foundation": "~2.8|~3.0|~4.0",
24-
"symfony/yaml": "~3.3|~4.0",
24+
"symfony/yaml": "~3.4|~4.0",
2525
"symfony/expression-language": "~2.8|~3.0|~4.0",
2626
"symfony/dependency-injection": "~3.3|~4.0",
2727
"doctrine/annotations": "~1.0",
@@ -31,7 +31,7 @@
3131
"conflict": {
3232
"symfony/config": "<2.8",
3333
"symfony/dependency-injection": "<3.3",
34-
"symfony/yaml": "<3.3"
34+
"symfony/yaml": "<3.4"
3535
},
3636
"suggest": {
3737
"symfony/http-foundation": "For using a Symfony Request object",

‎src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private function getClassesFromYaml()
113113
$this->yamlParser = new Parser();
114114
}
115115

116-
$classes = $this->yamlParser->parse(file_get_contents($this->file));
116+
$classes = $this->yamlParser->parseFile($this->file);
117117

118118
if (empty($classes)) {
119119
return array();

‎src/Symfony/Component/Translation/Loader/YamlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Loader/YamlFileLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function loadResource($resource)
3939
}
4040

4141
try {
42-
$messages = $this->yamlParser->parse(file_get_contents($resource));
42+
$messages = $this->yamlParser->parseFile($resource);
4343
} catch (ParseException $e) {
4444
throw new InvalidResourceException(sprintf('Error parsing YAML, invalid file "%s"', $resource), 0, $e);
4545
}

‎src/Symfony/Component/Translation/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/composer.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
"symfony/config": "~2.8|~3.0|~4.0",
2424
"symfony/dependency-injection": "~3.4|~4.0",
2525
"symfony/intl": "^2.8.18|^3.2.5|~4.0",
26-
"symfony/yaml": "~3.3|~4.0",
26+
"symfony/yaml": "~3.4|~4.0",
2727
"symfony/finder": "~2.8|~3.0|~4.0",
2828
"psr/log": "~1.0"
2929
},
3030
"conflict": {
3131
"symfony/config": "<2.8",
3232
"symfony/dependency-injection": "<3.4",
33-
"symfony/yaml": "<3.3"
33+
"symfony/yaml": "<3.4"
3434
},
3535
"suggest": {
3636
"symfony/config": "",

‎src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Mapping/Loader/YamlFileLoader.php
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.