From 2eca533fa7440d308958685a80aca3fab6b5bcf5 Mon Sep 17 00:00:00 2001 From: Wouter Sioen Date: Sat, 23 Apr 2016 12:40:15 +0200 Subject: [PATCH] Make the Yaml reader work with symfony/yaml 3.0 > The ability to pass file names to the parse method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. (source https://github.com/symfony/yaml/blob/2.8/Yaml.php#L52) --- src/Igorw/Silex/YamlConfigDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Igorw/Silex/YamlConfigDriver.php b/src/Igorw/Silex/YamlConfigDriver.php index 5b849a9..03d1bb3 100644 --- a/src/Igorw/Silex/YamlConfigDriver.php +++ b/src/Igorw/Silex/YamlConfigDriver.php @@ -11,7 +11,7 @@ public function load($filename) if (!class_exists('Symfony\\Component\\Yaml\\Yaml')) { throw new \RuntimeException('Unable to read yaml as the Symfony Yaml Component is not installed.'); } - $config = Yaml::parse($filename); + $config = Yaml::parse(file_get_contents($filename)); return $config ?: array(); }