diff --git a/src/Configuration.php b/src/Configuration.php index a3c0a48..2437b4b 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -23,7 +23,12 @@ class Configuration { $config = new Configuration(); - $yaml = Yaml::parseFile($file); + $file = realpath($file); + if (!file_exists($file)) { + throw new \Exception("Configuration file not found"); + } + $data = file_get_contents($file); + $yaml = Yaml::parse($data); if (isset($yaml['security'])) { $security = $yaml['security'];