This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Yaml
Fabien Potencier ac756bf39e added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse()
PHP support when parsing a file has been disabled by default.
If you do need PHP support when parsing a YAML file, enable it via:

    Yaml::setPhpParsing(true);

As of Symfony 2.1, PHP support is disabled by default, and support will
be removed in Symfony 2.3.
2013-01-17 16:07:24 +01:00
..
Exception fixed some phpdoc 2012-01-11 15:46:50 +01:00
composer.json removed the version attribute in all composer.json files 2012-01-05 14:51:20 +01:00
Dumper.php fixed phpdoc @param alignment 2012-05-15 18:56:32 +02:00
Escaper.php fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
Inline.php fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
LICENSE updated license year 2013-01-04 17:59:43 +01:00
Parser.php fixed phpdoc @param alignment 2012-05-15 18:56:32 +02:00
README.md tweaked the README files 2011-12-18 14:22:28 +01:00
Unescaper.php fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
Yaml.php added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse() 2013-01-17 16:07:24 +01:00

Yaml Component

YAML implements most of the YAML 1.2 specification.

use Symfony\Component\Yaml\Yaml;

$array = Yaml::parse($file);

print Yaml::dump($array);

Resources

Unit tests:

https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Yaml