Skip to content

Commit cd81c36

Browse files
authored
[UPMERGE] 2.0 -> 2.1 (#34)
This PR has been generated automatically. For more details see [upmerge_pr.yaml](/Sylius/TestApplication/blob/2.0/.github/workflows/upmerge_pr.yaml). **Remember!** The upmerge should always be merged with using `Merge pull request` button. In case of conflicts, please resolve them manually with usign the following commands: ``` git fetch upstream gh pr checkout <this-pr-number> git merge upstream/2.1 -m "Resolve conflicts between 2.0 and 2.1" ``` If you use other name for the upstream remote, please replace `upstream` with the name of your remote pointing to the `Sylius/TestApplication` repository. Once the conflicts are resolved, please run `git merge --continue` and push the changes to this PR.
2 parents 4922437 + da9121f commit cd81c36

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Kernel.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
7676

7777
$container->setAlias($kernelClass, 'kernel')->setPublic(true);
7878

79-
$configsToImport = $_SERVER['SYLIUS_TEST_APP_CONFIGS_TO_IMPORT'] ?? null;
79+
$configsToImport = $_SERVER['SYLIUS_TEST_APP_CONFIGS_TO_IMPORT'] ?? $_SERVER['CONFIGS_TO_IMPORT'] ?? null;
8080
if (null !== $configsToImport) {
8181
foreach (explode(';', $configsToImport) as $filePath) {
8282
$kernelLoader->import($filePath);
@@ -121,7 +121,7 @@ public function loadRoutes(LoaderInterface $loader): RouteCollection
121121
$routes = new RoutingConfigurator($collection, $kernelLoader, $file, $file, $this->getEnvironment());
122122
$configureRoutes->getClosure($this)($routes);
123123

124-
$routesToImport = $_SERVER['SYLIUS_TEST_APP_ROUTES_TO_IMPORT'] ?? null;
124+
$routesToImport = $_SERVER['SYLIUS_TEST_APP_ROUTES_TO_IMPORT'] ?? $_SERVER['ROUTES_TO_IMPORT'] ?? null;
125125
if (null !== $routesToImport) {
126126
foreach (explode(';', $routesToImport) as $filePath) {
127127
$routes->import($filePath);
@@ -148,7 +148,7 @@ private function loadMainBundles(string $path): array
148148

149149
private function loadAdditionalBundlesFromEnv(array &$contents): bool
150150
{
151-
$bundlesPathEnv = $_SERVER['SYLIUS_TEST_APP_BUNDLES_PATH'] ?? null;
151+
$bundlesPathEnv = $_SERVER['SYLIUS_TEST_APP_BUNDLES_PATH'] ?? $_SERVER['TEST_APP_BUNDLES_PATH'] ?? null;
152152
if (null === $bundlesPathEnv) {
153153
return false;
154154
}
@@ -175,7 +175,7 @@ private function loadAdditionalBundlesFromEnv(array &$contents): bool
175175

176176
private function loadBundlesToEnable(array &$contents): void
177177
{
178-
$bundlesToEnable = $_SERVER['SYLIUS_TEST_APP_BUNDLES_TO_ENABLE'] ?? null;
178+
$bundlesToEnable = $_SERVER['SYLIUS_TEST_APP_BUNDLES_TO_ENABLE'] ?? $_SERVER['BUNDLES_TO_ENABLE'] ?? null;
179179
if (null === $bundlesToEnable) {
180180
return;
181181
}
@@ -189,8 +189,8 @@ private function loadBundlesToEnable(array &$contents): void
189189

190190
private function resolveBundlesPath(): string
191191
{
192-
if (isset($_SERVER['SYLIUS_TEST_APP_BUNDLES_REPLACE_PATH'])) {
193-
$relativePath = $_SERVER['SYLIUS_TEST_APP_BUNDLES_REPLACE_PATH'];
192+
$relativePath = $_SERVER['SYLIUS_TEST_APP_BUNDLES_REPLACE_PATH'] ?? null;
193+
if (null !== $relativePath) {
194194
$absolutePath = \dirname($this->getProjectDir(), 3) . '/' . ltrim($relativePath, '/');
195195

196196
if (is_file($absolutePath)) {

0 commit comments

Comments
 (0)