file)) { throw FileNotFound::new($this->file); } $content = file_get_contents($this->file); assert($content !== false); try { $config = Yaml::parse($content); } catch (ParseException $e) { throw YamlNotValid::malformed(); } if (! is_array($config)) { throw YamlNotValid::invalid(); } if (isset($config['migrations_paths'])) { $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( $config['migrations_paths'], $this->file ); } return (new ConfigurationArray($config))->getConfiguration(); } }