#!/usr/bin/env php getParameterOption(['--env', '-e'], $context['APP_ENV'] ?? 'prod', true); $debug = ($context['APP_DEBUG'] ?? ($env !== 'prod')) && !$input->hasParameterOption('--no-debug', true); $pluginLoader = new StaticKernelPluginLoader($classLoader, null); if ($input->getFirstArgument() === 'system:install') { $context['INSTALL'] = true; } if (!isset($context['INSTALL'])) { $useComposerPluginLoader = (bool) ($context['COMPOSER_PLUGIN_LOADER'] ?? false); if ($useComposerPluginLoader) { $pluginLoader = new ComposerPluginLoader($classLoader, null); } elseif (trim($context['DATABASE_URL'] ?? '') !== '') { $pluginLoader = new DbalKernelPluginLoader($classLoader, null, Kernel::getConnection()); } } $kernel = KernelFactory::create( environment: $env, debug: $debug, classLoader: $classLoader, pluginLoader: $pluginLoader, ); $application = new Application($kernel); $kernel->boot(); $application->setName('Shopware'); $application->setVersion($kernel->getContainer()->getParameter('kernel.shopware_version')); return $application; };