src/DependencyInjection/DelegatingLoaderFactory.php
public function createContainerBuilderAndConfig(
        ContainerBuilder $containerBuilder,
        string $config
    ): DelegatingLoader {
        $fileLocator = new SimpleFileLocator(dirname($config));

        return $this->createFromContainerBuilderAndFileLocator($containerBuilder, $fileLocator);
    }
public function createContainerBuilderAndConfig(
        ContainerBuilder $containerBuilder,
        string $config
    ): DelegatingLoader {
        $fileLocator = new SimpleFileLocator(dirname($config));

        return $this->createFromContainerBuilderAndFileLocator($containerBuilder, $fileLocator);
    }
For tests