setParameter('kupshop.db.host', $cfg['Connection']['host']); $container->setParameter('kupshop.db.database', $cfg['Connection']['database']); $container->setParameter('kupshop.db.user', $cfg['Connection']['user']); $container->setParameter('kupshop.db.password', $cfg['Connection']['password']); $container->setParameter('kupshop.cache.symfonyMemcached', $cfg['Cache']['symfonyMemcached'] ?? 'memcached://localhost'); $bundleFinder = new BundleFinder(new PathFinder()); $bundleFinder->setContainer($container); $loadCoreConfig = function ($file) use ($bundleFinder, $loader) { foreach ($bundleFinder->getExistingBundlesPath('Resources/config/'.$file) as $path) { $loader->import($path); } }; $loadCoreConfig('core-config.yml'); $env = $container->getParameter('kernel.environment'); $loadCoreConfig("core-config_{$env}.yml"); if (findModule(Modules::COMPONENTS)) { $loadCoreConfig('components-config.yml'); }