setContainer($container); foreach ($bundleFinder->getBundlesPath('Resources/config') as $bundle => $file) { $locator = new FileLocator($file); $loader = new Loader\YamlFileLoader($container, $locator); $loader->load('services.yml'); // Avoid loading from KupShopBundle - contains global config if ($bundle == 'KupShopBundle') { continue; } try { $loader->load('config.yml'); } catch (FileLocatorFileNotFoundException $e) { // ignore non-exiting config.yml file } } if (isDevelopment()) { // watch config.php to automatically regenerate container $container->fileExists('include/config.php'); $container->fileExists('config/config.php'); } } }