diff --git a/classes/phing/system/io/YamlFileParser.php b/classes/phing/system/io/YamlFileParser.php index 23d2dfeabe..6cbcbc7959 100644 --- a/classes/phing/system/io/YamlFileParser.php +++ b/classes/phing/system/io/YamlFileParser.php @@ -38,6 +38,14 @@ public function parseFile(PhingFile $file) } try { + + if (!class_exists('\Symfony\Component\Yaml\Parser')) { + throw new BuildException( + get_class($this) + . ' depends on \Symfony\Component\Yaml\Parser ' + . 'being installed and on include_path.' + ); + } // We load the Yaml class without the use of namespaces to prevent // parse errors in PHP 5.2. $parserClass = '\Symfony\Component\Yaml\Parser';