Skip to content

Commit fbb5dcb

Browse files
pweyckgithub-actions[bot]
authored andcommitted
chore: update shopware/platform package
1 parent 9be0b24 commit fbb5dcb

File tree

5 files changed

+58
-16
lines changed

5 files changed

+58
-16
lines changed

shopware/platform/6.4/bin/ci

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4+
use Shopware\Core\Framework\Adapter\Kernel\KernelFactory;
45
use Shopware\Core\Framework\Plugin\KernelPluginLoader\ComposerPluginLoader;
56
use Shopware\Core\HttpKernel;
67
use Symfony\Bundle\FrameworkBundle\Console\Application;
@@ -29,8 +30,6 @@ return static function (array &$context) {
2930
$env = $input->getParameterOption(['--env', '-e'], $context['APP_ENV'] ?? 'prod', true);
3031
$debug = ($context['APP_DEBUG'] ?? ($env !== 'prod')) && !$input->hasParameterOption('--no-debug', true);
3132

32-
$pluginLoader = new ComposerPluginLoader($classLoader, null);
33-
3433
if ($input->getFirstArgument() === 'system:install') {
3534
$context['INSTALL'] = true;
3635
}
@@ -40,14 +39,24 @@ return static function (array &$context) {
4039
$_SERVER['DATABASE_URL'] = 'mysql://_placeholder.test';
4140
}
4241

43-
$kernel = new HttpKernel($env, $debug, $classLoader);
44-
$kernel->setPluginLoader($pluginLoader);
42+
if (method_exists(KernelFactory::class, "create")) {
43+
$kernel = KernelFactory::create(
44+
environment: $env,
45+
debug: $debug,
46+
classLoader: $classLoader,
47+
pluginLoader: new ComposerPluginLoader($classLoader, null)
48+
);
49+
} else {
50+
$kernel = new HttpKernel($env, $debug, $classLoader);
51+
$kernel->setPluginLoader(new ComposerPluginLoader($classLoader, null));
52+
$kernel = $kernel->getKernel();
53+
}
4554

46-
$application = new Application($kernel->getKernel());
47-
$kernel->getKernel()->boot();
55+
$application = new Application($kernel);
56+
$kernel->boot();
4857

4958
$application->setName('Shopware');
50-
$application->setVersion($kernel->getKernel()->getContainer()->getParameter('kernel.shopware_version'));
59+
$application->setVersion($kernel->getContainer()->getParameter('kernel.shopware_version'));
5160

5261
return $application;
5362
};

shopware/platform/6.4/bin/console

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
#!/usr/bin/env php
22
<?php
33

4+
use Shopware\Core\Framework\Adapter\Kernel\KernelFactory;
45
use Shopware\Core\Framework\Plugin\KernelPluginLoader\DbalKernelPluginLoader;
56
use Shopware\Core\Framework\Plugin\KernelPluginLoader\StaticKernelPluginLoader;
67
use Shopware\Core\HttpKernel;
78
use Shopware\Core\Kernel;
89
use Symfony\Bundle\FrameworkBundle\Console\Application;
910
use Symfony\Component\Console\Input\ArgvInput;
1011

12+
$envFile = __DIR__ . '/../.env';
13+
1114
if (!file_exists(__DIR__ . '/../.env') && !file_exists(__DIR__ . '/../.env.dist') && !file_exists(__DIR__ . '/../.env.local.php')) {
1215
$_SERVER['APP_RUNTIME_OPTIONS']['disable_dotenv'] = true;
1316
}
@@ -44,14 +47,24 @@ return static function (array &$context) {
4447
$pluginLoader = new DbalKernelPluginLoader($classLoader, null, \Shopware\Core\Kernel::getConnection());
4548
}
4649

47-
$kernel = new HttpKernel($env, $debug, $classLoader);
48-
$kernel->setPluginLoader($pluginLoader);
50+
if (method_exists(KernelFactory::class, "create")) {
51+
$kernel = KernelFactory::create(
52+
environment: $env,
53+
debug: $debug,
54+
classLoader: $classLoader,
55+
pluginLoader: $pluginLoader
56+
);
57+
} else {
58+
$kernel = new HttpKernel($env, $debug, $classLoader);
59+
$kernel->setPluginLoader($pluginLoader);
60+
$kernel = $kernel->getKernel();
61+
}
4962

50-
$application = new Application($kernel->getKernel());
51-
$kernel->getKernel()->boot();
63+
$application = new Application($kernel);
64+
$kernel->boot();
5265

5366
$application->setName('Shopware');
54-
$application->setVersion($kernel->getKernel()->getContainer()->getParameter('kernel.shopware_version'));
67+
$application->setVersion($kernel->getContainer()->getParameter('kernel.shopware_version'));
5568

5669
return $application;
5770
};

shopware/platform/6.4/post-install.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
1. Go to the project directory
44
2. Create your code repository with the <comment>git init</comment> command and push it to your favourite Git service
55

6-
* <fg=blue>Run</> locally Shopware:
6+
* <fg=blue>Run</> Shopware locally:
77

88
1. Adjust the <comment>.env</comment> file to your database
99
2. Run <comment>./bin/console system:install --basic-setup</comment>
1010
3. Optional: If you use Symfony CLI start the webserver <comment>symfony server:start -d</comment>
1111
3. The default credentials for administration are <comment>admin</comment> with password <comment>shopware</comment>
1212

13-
* <fg=blue>Run</> with Docker Shopware with Symfony CLI:
13+
* <fg=blue>Run</> Shopware with Docker & Symfony CLI:
1414

1515
1. Start the docker containers with <comment>docker compose up -d</comment>
1616
2. Run <comment>symfony console system:install --basic-setup</comment>
@@ -19,3 +19,8 @@
1919
5. Optional: Open the Mail catcher with <comment>symfony open:local:webmail</comment>
2020

2121
* <fg=blue>Read</> the documentation at <comment>https://developer.shopware.com/</>
22+
23+
* <fg=yellow>Warning</> if updating from older versions of the production template:
24+
25+
There might be old `require-dev` dependencies in your `composer.json` file. Please remove them before updating shopware/core to versions >= v6.4.
26+
You can do it using this command: <comment>composer config --unset require-dev</>

shopware/platform/6.4/public/index.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Shopware\Core\HttpKernel;
66
use Shopware\Core\Installer\InstallerKernel;
77
use Symfony\Component\HttpFoundation\Request;
8+
use Shopware\Core\Framework\Adapter\Kernel\KernelFactory;
89
use Symfony\Component\HttpFoundation\Response;
910
use Symfony\Component\HttpKernel\HttpKernelInterface;
1011
use Symfony\Component\HttpKernel\TerminableInterface;
@@ -50,6 +51,20 @@
5051
return new InstallerKernel($appEnv, $debug);
5152
}
5253

54+
if (method_exists(KernelFactory::class, "create")) {
55+
$pluginLoader = null;
56+
if (EnvironmentHelper::getVariable('COMPOSER_PLUGIN_LOADER', false)) {
57+
$pluginLoader = new ComposerPluginLoader($classLoader, null);
58+
}
59+
60+
return KernelFactory::create(
61+
environment: $appEnv,
62+
debug: $debug,
63+
classLoader: $classLoader,
64+
pluginLoader: $pluginLoader
65+
);
66+
}
67+
5368
$shopwareHttpKernel = new HttpKernel($appEnv, $debug, $classLoader);
5469

5570
if (EnvironmentHelper::getVariable('COMPOSER_PLUGIN_LOADER', false)) {

shopware/platform/6.6/post-install.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
1. Go to the project directory
44
2. Create your code repository with the <comment>git init</comment> command and push it to your favourite Git service
55

6-
* <fg=blue>Run</> locally Shopware:
6+
* <fg=blue>Run</> Shopware locally:
77

88
1. Adjust the <comment>.env</comment> file to your database
99
2. Run <comment>./bin/console system:install --basic-setup</comment>
1010
3. Optional: If you use Symfony CLI start the webserver <comment>symfony server:start -d</comment>
1111
3. The default credentials for administration are <comment>admin</comment> with password <comment>shopware</comment>
1212

13-
* <fg=blue>Run</> with Docker Shopware with Symfony CLI:
13+
* <fg=blue>Run</> Shopware with Docker & Symfony CLI:
1414

1515
1. Start the docker containers with <comment>docker compose up -d</comment>
1616
2. Run <comment>symfony console system:install --basic-setup</comment>

0 commit comments

Comments
 (0)