From bc7c140e01b4c3e01fb8d35611e9b0044db0a866 Mon Sep 17 00:00:00 2001
From: bjorn <bjorn@swis.nl>
Date: Thu, 4 Apr 2024 16:23:39 +0200
Subject: [PATCH] Mongodb install throough pecl, yay for 8.3 :(

---
 .gitlab-ci.yml                    | 5 ++++-
 .gitlab-ci/pipeline-test-only.yml | 2 +-
 .gitlab-ci/pipeline.yml           | 3 +--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 36a069c1c998..88da30cbd83c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -107,6 +107,9 @@ default:
   rules:
     - if: $PERFORMANCE_TEST != "1"
 
+.mongodb-install: &mongodb-install |-
+  apt update && apt install autoconf file g++ gcc make pkg-config re2c --yes && docker-php-ext-pecl-install mongodb
+
 
 ################
 # Stages
@@ -285,7 +288,7 @@ default:
     paths:
       - vendor/
   script:
-      - docker-php-ext-pecl-install mongodb
+      - *mongodb-install
       - composer validate
       - composer install
       - if [ -n "$COMPOSER_UPDATE" ]; then
diff --git a/.gitlab-ci/pipeline-test-only.yml b/.gitlab-ci/pipeline-test-only.yml
index de9ea854645b..b82f0f056098 100644
--- a/.gitlab-ci/pipeline-test-only.yml
+++ b/.gitlab-ci/pipeline-test-only.yml
@@ -44,7 +44,7 @@ variables:
       [[ $_TARGET_DB == mariadb* ]] && export SIMPLETEST_DB=mysql://$MYSQL_USER:$MYSQL_PASSWORD@database/$MYSQL_DATABASE?module=mysql
       [[ $_TARGET_DB == pgsql* ]] && export SIMPLETEST_DB=pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@database/$POSTGRES_DB?module=pgsql
     - echo -e "\e[0Ksection_start:`date +%s`:my_first_section[collapsed=true]\r\e[0KInstall PHP Extension"
-    - pecl install mongodb && docker-php-ext-enable mongodb
+    - *mongodb-install
     - echo -e "\e[0Ksection_end:`date +%s`:my_first_section\r\e[0K"
     - $CI_PROJECT_DIR/.gitlab-ci/scripts/server-setup.sh
   script:
diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml
index d2a23987f0bf..62a8d211f4a3 100644
--- a/.gitlab-ci/pipeline.yml
+++ b/.gitlab-ci/pipeline.yml
@@ -27,7 +27,7 @@ default:
       [[ $_TARGET_DB == pgsql* ]] && export SIMPLETEST_DB=pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@database/$POSTGRES_DB?module=pgsql
     - echo "SIMPLETEST_DB = $SIMPLETEST_DB"
     - echo -e "\e[0Ksection_start:`date +%s`:my_first_section[collapsed=true]\r\e[0KInstall PHP Extension"
-    - pecl install mongodb && docker-php-ext-enable mongodb
+    - *mongodb-install
     - echo -e "\e[0Ksection_end:`date +%s`:my_first_section\r\e[0K"
     - $CI_PROJECT_DIR/.gitlab-ci/scripts/server-setup.sh
   after_script:
@@ -67,7 +67,6 @@ variables:
   MYSQL_DATABASE: mysql
   MYSQL_USER: drupaltestbot
   MYSQL_PASSWORD: drupaltestbotpw
-  COMPOSER_EXTRA: --ignore-platform-req=ext-mongodb
   POSTGRES_DB: drupaltestbot
   POSTGRES_USER: drupaltestbot
   POSTGRES_PASSWORD: drupaltestbotpw
-- 
GitLab