From adfbc28e578e1e8a7f41019bbb59c4cd187dbaa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Pr=C3=A9vot?= Date: Sun, 17 May 2015 20:01:28 -0400 Subject: [PATCH] Pass YAML contents to Yaml::parse Make the call compatible with future Symfony version, and avoid E_USER_DEPRECATED as thrown by the current 2.7.0-beta2: The ability to pass file names to the Symfony\Component\Yaml\Yaml::parse method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. --- PHPUnit/Extensions/Database/DataSet/SymfonyYamlParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPUnit/Extensions/Database/DataSet/SymfonyYamlParser.php b/PHPUnit/Extensions/Database/DataSet/SymfonyYamlParser.php index 37fc5069..e01e6017 100644 --- a/PHPUnit/Extensions/Database/DataSet/SymfonyYamlParser.php +++ b/PHPUnit/Extensions/Database/DataSet/SymfonyYamlParser.php @@ -21,6 +21,6 @@ class PHPUnit_Extensions_Database_DataSet_SymfonyYamlParser implements PHPUnit_Extensions_Database_DataSet_IYamlParser { public function parseYaml($yamlFile) { - return Symfony\Component\Yaml\Yaml::parse($yamlFile); + return Symfony\Component\Yaml\Yaml::parse(file_get_contents($yamlFile)); } }