Skip to content


Subversion checkout URL

You can clone with
Download ZIP
[READ-ONLY] Subtree split of the Symfony YAML Component -- clone into Symfony/Component/ (master at symfony/symfony)
Latest commit e450ed0 @nicolas-grekas nicolas-grekas Merge branch '2.8'
* 2.8:
  Always enable clock-mock for HttpFoundation
  [ClassLoader] Fix parsing namespace when token_get_all() is missing
  Bug #16343 [Router] Too many Routes ?
  Fixes the stack traces of the deprecation logs
  fix unused variable warning
  [Translation][Form] Do not translate form labels and placeholders when 'translation_domain' is false
  add composer exclude-from-classmap for new 2.8 components
  [Yaml] sync changelog and upgrade files
  [Debug] Ensure class declarations are loaded only once
  Minor design tweaks for the Logs and Doctrine profiler panels


Yaml Component

YAML implements most of the YAML 1.2 specification.

use Symfony\Component\Yaml\Yaml;

$array = Yaml::parse(file_get_contents(filename));

print Yaml::dump($array);


You can run the unit tests with the following command:

$ cd path/to/Symfony/Component/Yaml/
$ composer install
$ phpunit
Something went wrong with that request. Please try again.