Skip to content

Commit

Permalink
minor symfony#6038 Fix symfony#6037 (zsturgess)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.0 branch.

Discussion
----------

Fix symfony#6037

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | >= 3.0
| Fixed tickets | symfony#6037

Removed an outdated caution block and rewrote an outdated paragraph.
Hopefully I've done everything correctly *crosses fingers*

Commits
-------

a7effb8 Fix symfony#6037
  • Loading branch information
xabbuh committed Dec 17, 2015
2 parents 7c60ea1 + a7effb8 commit a6ed958
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions components/yaml/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,9 @@ It may also be convenient to use the
$yaml = Yaml::parse(file_get_contents('/path/to/file.yml'));
The :method:`Symfony\\Component\\Yaml\\Yaml::parse` static method takes a YAML
string or a file containing YAML. Internally, it calls the
:method:`Symfony\\Component\\Yaml\\Parser::parse` method, but enhances the
error if something goes wrong by adding the filename to the message.

.. caution::

Because it is currently possible to pass a filename to this method, you
must validate the input first. Passing a filename is deprecated in
Symfony 2.2, and will be removed in Symfony 3.0.
The :method:`Symfony\\Component\\Yaml\\Yaml::parse` static method takes a YAML string.
Internally, it constructs a :class:`Symfony\\Component\\Yaml\\Parser` object and calls
the :method:`Symfony\\Component\\Yaml\\Parser::parse` method.

.. _components-yaml-dump:

Expand Down

0 comments on commit a6ed958

Please sign in to comment.