From 16c23e7f367c3fb1420e5886d19cb8be0a73ae84 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 4 Jan 2015 12:42:53 +0100 Subject: [PATCH] don't show deprecated usage of Yaml::parse() --- components/config/definition.rst | 4 ++-- components/config/resources.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/config/definition.rst b/components/config/definition.rst index 296fd9197ba..dc0e303bb7f 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -576,8 +576,8 @@ Otherwise the result is a clean array of configuration values:: use Symfony\Component\Config\Definition\Processor; use Acme\DatabaseConfiguration; - $config1 = Yaml::parse(__DIR__.'/src/Matthias/config/config.yml'); - $config2 = Yaml::parse(__DIR__.'/src/Matthias/config/config_extra.yml'); + $config1 = Yaml::parse(file_get_contents(__DIR__.'/src/Matthias/config/config.yml')); + $config2 = Yaml::parse(file_get_contents(__DIR__.'/src/Matthias/config/config_extra.yml')); $configs = array($config1, $config2); diff --git a/components/config/resources.rst b/components/config/resources.rst index bcc47aa02e1..a1d46565803 100644 --- a/components/config/resources.rst +++ b/components/config/resources.rst @@ -39,7 +39,7 @@ class, which allows for recursively importing other resources:: { public function load($resource, $type = null) { - $configValues = Yaml::parse($resource); + $configValues = Yaml::parse(file_get_contents($resource)); // ... handle the config values