From 431e85574edd09b094b4f5dfcada3ac69cbf3155 Mon Sep 17 00:00:00 2001 From: abelland Date: Wed, 10 Jun 2015 17:50:18 +0200 Subject: [PATCH] Symfony component Yaml has deprecated Yaml::parse this code avoids deprecated error message in current version. --- 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(); }