private function registerConfigLoader()
{
$responsesPath = $this->container->getParameter('tutu.root_path') . '/config/responses.yml';
if ($customPath = getenv('tutu_responses')) {
if (!file_exists($customPath)) {
throw new \RuntimeException('Custom responses file not found at ' . $customPath);
}
$responsesPath = $customPath;
}
$this->container->setParameter('responses_file_path', $responsesPath);
$this->container->setDefinition('response.config.loader.yaml', function ($container) {
return new YamlLoader($container->getParameter('responses_file_path'));
});
}