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: src/Symfony/Component/Yaml/Yaml.php
+2-29Lines changed: 2 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -34,48 +34,21 @@ class Yaml
34
34
* print_r($array);
35
35
* </code>
36
36
*
37
-
* As this method accepts both plain strings and file names as an input,
38
-
* you must validate the input before calling this method. Passing a file
39
-
* as an input is a deprecated feature and will be removed in 3.0.
40
-
*
41
-
* @param string $input Path to a YAML file or a string containing YAML
37
+
* @param string $input A string containing YAML
42
38
* @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types false otherwise
43
39
* @param bool $objectSupport True if object support is enabled, false otherwise
44
40
*
45
41
* @return array The YAML converted to a PHP array
46
42
*
47
43
* @throws ParseException If the YAML is not valid
48
44
*
49
-
* @deprecated The ability to pass file names to Yaml::parse() was deprecated in 2.2 and will be removed in 3.0. Please, pass the contents of the file instead.
if (strpos($input, "\n") === false && is_file($input)) {
58
-
trigger_error('The ability to pass file names to Yaml::parse() was deprecated in 2.2 and will be removed in 3.0. Please, pass the contents of the file instead.', E_USER_DEPRECATED);
59
-
60
-
if (false === is_readable($input)) {
61
-
thrownewParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input));
0 commit comments