for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Deployee\Components\Config;
use Symfony\Component\Yaml\Yaml;
class ConfigLoader
{
public function load(string $filepath)
if(!is_file($filepath) || !($fileContents = file_get_contents($filepath))){
throw new \RuntimeException(sprintf('Could not open %s', $filepath));
}
$contents = Yaml::parse($fileContents);
return new Config($contents);