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