From aab252a3bf74247374fe49b3c5d9fc955942ba14 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 29 Jul 2021 16:56:36 +0200
Subject: [PATCH] Remove unused API_DEPLOYMENT_ENV

While it might be useful for later stages in development, let's keep this simple
---
 .gitlab-ci/deploy.php | 2 --
 src/Kernel.php        | 6 +-----
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/.gitlab-ci/deploy.php b/.gitlab-ci/deploy.php
index d2f4128..5fe0bda 100644
--- a/.gitlab-ci/deploy.php
+++ b/.gitlab-ci/deploy.php
@@ -35,7 +35,6 @@ host('development')
     ->set('shared_dirs', ['var/log', 'var/sessions'])
     ->set('APP_ENV', 'prod')
     ->set('APP_DEBUG', '0')
-    ->set('API_DEPLOYMENT_ENV', 'development')
     ->set('KEYCLOAK_SERVER_URL', 'https://auth-dev.tugraz.at/auth')
     ->set('KEYCLOAK_CLIENT_ID', 'auth-dev-mw-dev')
     ->set('KEYCLOAK_FRONTEND_CLIENT_ID', 'auth-dev-mw-frontend')
@@ -52,7 +51,6 @@ task('build-custom', function () {
         'KEYCLOAK_CLIENT_SECRET' => getenv('KEYCLOAK_CLIENT_SECRET'),
         'APP_ENV' => $APP_ENV,
         'APP_DEBUG' => get('APP_DEBUG'),
-        'API_DEPLOYMENT_ENV' => get('API_DEPLOYMENT_ENV'),
         'KEYCLOAK_SERVER_URL' => get('KEYCLOAK_SERVER_URL'),
         'KEYCLOAK_CLIENT_ID' => get('KEYCLOAK_CLIENT_ID'),
         'KEYCLOAK_FRONTEND_CLIENT_ID' => get('KEYCLOAK_FRONTEND_CLIENT_ID'),
diff --git a/src/Kernel.php b/src/Kernel.php
index f053015..e63175f 100644
--- a/src/Kernel.php
+++ b/src/Kernel.php
@@ -15,11 +15,7 @@ class Kernel extends BaseKernel
 
     protected function configureContainer(ContainerConfigurator $container): void
     {
-        // Ignore all errors in case we are not local/development. We disable some
-        // bundles in demo/prod which leads to unused config, which symfony fails over.
-        $ignoreErrors = !in_array($_ENV['API_DEPLOYMENT_ENV'], ['local', 'development'], true);
-
-        $container->import('../config/{packages}/*.yaml', null, $ignoreErrors);
+        $container->import('../config/{packages}/*.yaml');
         $container->import('../config/{packages}/'.$this->environment.'/*.yaml');
 
         if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
-- 
GitLab