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