diff --git a/shopware/core/6.4/bin/ci b/shopware/core/6.4/bin/ci index fcd788ce..e9f453bf 100755 --- a/shopware/core/6.4/bin/ci +++ b/shopware/core/6.4/bin/ci @@ -1,6 +1,7 @@ #!/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 ComposerPluginLoader($classLoader, null); - if ($input->getFirstArgument() === 'system:install') { $context['INSTALL'] = true; } @@ -40,14 +39,24 @@ return static function (array &$context) { $_SERVER['DATABASE_URL'] = 'mysql://_placeholder.test'; } - $kernel = new HttpKernel($env, $debug, $classLoader); - $kernel->setPluginLoader($pluginLoader); + if (method_exists(KernelFactory::class, "create")) { + $kernel = KernelFactory::create( + environment: $env, + debug: $debug, + classLoader: $classLoader, + pluginLoader: new ComposerPluginLoader($classLoader, null) + ); + } else { + $kernel = new HttpKernel($env, $debug, $classLoader); + $kernel->setPluginLoader(new ComposerPluginLoader($classLoader, null)); + $kernel = $kernel->getKernel(); + } - $application = new Application($kernel->getKernel()); - $kernel->getKernel()->boot(); + $application = new Application($kernel); + $kernel->boot(); $application->setName('Shopware'); - $application->setVersion($kernel->getKernel()->getContainer()->getParameter('kernel.shopware_version')); + $application->setVersion($kernel->getContainer()->getParameter('kernel.shopware_version')); return $application; }; diff --git a/shopware/core/6.4/bin/console b/shopware/core/6.4/bin/console index 3ff7df35..6ec51bec 100755 --- a/shopware/core/6.4/bin/console +++ b/shopware/core/6.4/bin/console @@ -1,6 +1,7 @@ #!/usr/bin/env php setPluginLoader($pluginLoader); + if (method_exists(KernelFactory::class, "create")) { + $kernel = KernelFactory::create( + environment: $env, + debug: $debug, + classLoader: $classLoader, + pluginLoader: $pluginLoader + ); + } else { + $kernel = new HttpKernel($env, $debug, $classLoader); + $kernel->setPluginLoader($pluginLoader); + $kernel = $kernel->getKernel(); + } - $application = new Application($kernel->getKernel()); - $kernel->getKernel()->boot(); + $application = new Application($kernel); + $kernel->boot(); $application->setName('Shopware'); - $application->setVersion($kernel->getKernel()->getContainer()->getParameter('kernel.shopware_version')); + $application->setVersion($kernel->getContainer()->getParameter('kernel.shopware_version')); return $application; }; diff --git a/shopware/core/6.4/post-install.txt b/shopware/core/6.4/post-install.txt index 6dc1c7b9..36869a6a 100644 --- a/shopware/core/6.4/post-install.txt +++ b/shopware/core/6.4/post-install.txt @@ -3,14 +3,14 @@ 1. Go to the project directory 2. Create your code repository with the git init command and push it to your favourite Git service - * Run locally Shopware: + * Run Shopware locally: 1. Adjust the .env file to your database 2. Run ./bin/console system:install --basic-setup 3. Optional: If you use Symfony CLI start the webserver symfony server:start -d 3. The default credentials for administration are admin with password shopware - * Run with Docker Shopware with Symfony CLI: + * Run Shopware with Docker & Symfony CLI: 1. Start the docker containers with docker compose up -d 2. Run symfony console system:install --basic-setup @@ -19,3 +19,8 @@ 5. Optional: Open the Mail catcher with symfony open:local:webmail * Read the documentation at https://developer.shopware.com/ + + * Warning if updating from older versions of the production template: + + There might be old `require-dev` dependencies in your `composer.json` file. Please remove them before updating shopware/core to versions >= v6.4. + You can do it using this command: composer config --unset require-dev diff --git a/shopware/core/6.4/public/index.php b/shopware/core/6.4/public/index.php index 7a0dc15b..eb330c67 100644 --- a/shopware/core/6.4/public/index.php +++ b/shopware/core/6.4/public/index.php @@ -5,6 +5,7 @@ use Shopware\Core\HttpKernel; use Shopware\Core\Installer\InstallerKernel; use Symfony\Component\HttpFoundation\Request; +use Shopware\Core\Framework\Adapter\Kernel\KernelFactory; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\TerminableInterface; @@ -50,6 +51,20 @@ return new InstallerKernel($appEnv, $debug); } + if (method_exists(KernelFactory::class, "create")) { + $pluginLoader = null; + if (EnvironmentHelper::getVariable('COMPOSER_PLUGIN_LOADER', false)) { + $pluginLoader = new ComposerPluginLoader($classLoader, null); + } + + return KernelFactory::create( + environment: $appEnv, + debug: $debug, + classLoader: $classLoader, + pluginLoader: $pluginLoader + ); + } + $shopwareHttpKernel = new HttpKernel($appEnv, $debug, $classLoader); if (EnvironmentHelper::getVariable('COMPOSER_PLUGIN_LOADER', false)) { diff --git a/shopware/core/6.6/post-install.txt b/shopware/core/6.6/post-install.txt index 6dc1c7b9..18d1b8f9 100644 --- a/shopware/core/6.6/post-install.txt +++ b/shopware/core/6.6/post-install.txt @@ -3,14 +3,14 @@ 1. Go to the project directory 2. Create your code repository with the git init command and push it to your favourite Git service - * Run locally Shopware: + * Run Shopware locally: 1. Adjust the .env file to your database 2. Run ./bin/console system:install --basic-setup 3. Optional: If you use Symfony CLI start the webserver symfony server:start -d 3. The default credentials for administration are admin with password shopware - * Run with Docker Shopware with Symfony CLI: + * Run Shopware with Docker & Symfony CLI: 1. Start the docker containers with docker compose up -d 2. Run symfony console system:install --basic-setup