for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* neuralyzer : Data Anonymization Library and CLI Tool
*
* PHP Version 7.2
* @author Emmanuel Dyan
* @copyright 2020 Emmanuel Dyan
* @package edyan/neuralyzer
* @license GNU General Public License v2.0
* @link https://github.com/edyan/neuralyzer
*/
namespace Edyan\Neuralyzer;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
* Class ContainerFactory
class ContainerFactory
{
* @throws \Exception
public static function createContainer(): ContainerBuilder
$container = new ContainerBuilder();
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../config'));
$loader->load('services.yml');
$container->addCompilerPass(new AddConsoleCommandPass());
$container->compile();
return $container;
}