throw new RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed. Try running "composer require symfony/yaml".'
);
} if (!
stream_is_local($file)) { throw new InvalidArgumentException(sprintf('This is not a local file "%s".',
$file));
} if (!
is_file($file)) { throw new InvalidArgumentException(sprintf('The file "%s" does not exist.',
$file));
} $this->yamlParser ??=
new YamlParser();
try { $configuration =
$this->yamlParser->
parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS
);
} catch (ParseException
$e) { throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: ',
$file).
$e->
getMessage(), 0,
$e);
} return $this->
validate($configuration,
$file);
} /**
* Validates a YAML file.
*
* @throws InvalidArgumentException When service file is not valid
*/