addCompilerPass(new Compiler\ExtensionCompilerPass()); $container->addCompilerPass(new Compiler\PhpParserCompilerPass()); $container->addCompilerPass(new Compiler\TaskCompilerPass()); $container->addCompilerPass(new Compiler\TestSuiteCompilerPass()); $container->addCompilerPass( new RegisterListenersPass('event_dispatcher', 'grumphp.event_listener', 'grumphp.event_subscriber') ); $container->addCompilerPass(new AddConsoleCommandPass()); // Load basic service file + custom user configuration $configDir = dirname(__DIR__, 2).$filesystem->ensureValidSlashes('/resources/config'); $loader = new YamlFileLoader($container, new FileLocator($configDir)); $loader->load('console.yml'); $loader->load('formatter.yml'); $loader->load('linters.yml'); $loader->load('locators.yml'); $loader->load('parameters.yml'); $loader->load('parsers.yml'); $loader->load('services.yml'); $loader->load('subscribers.yml'); $loader->load('tasks.yml'); $loader->load('util.yml'); // Load grumphp.yml file: if ($filesystem->exists($path)) { $loader->load($path); } // Add additional paths $container->setParameter('config_file', $path); // Compile configuration to make sure that tasks are added to the taskrunner $container->compile(); return $container; } }