From b3048a1c6435135ff390636b6ba091bf34fdd1d6 Mon Sep 17 00:00:00 2001 From: Dusan Maric Date: Fri, 23 Sep 2022 13:38:02 +0200 Subject: [PATCH 1/5] mongodb.sh: bump PHP driver to 1.14.1 version --- scripts/features/mongodb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/features/mongodb.sh b/scripts/features/mongodb.sh index ea690100a..0f98110ae 100755 --- a/scripts/features/mongodb.sh +++ b/scripts/features/mongodb.sh @@ -41,7 +41,7 @@ sudo systemctl enable mongod sudo systemctl start mongod sudo rm -rf /tmp/mongo-php-driver /usr/src/mongo-php-driver -git clone -c advice.detachedHead=false -q -b '1.12.0' --single-branch https://github.com/mongodb/mongo-php-driver.git /tmp/mongo-php-driver +git clone -c advice.detachedHead=false -q -b '1.14.1' --single-branch https://github.com/mongodb/mongo-php-driver.git /tmp/mongo-php-driver sudo mv /tmp/mongo-php-driver /usr/src/mongo-php-driver cd /usr/src/mongo-php-driver git submodule -q update --init From e7e86dc0c6a5973eedad2df49cf52a96f883123f Mon Sep 17 00:00:00 2001 From: Dusan Maric Date: Wed, 18 Jan 2023 10:20:17 +0100 Subject: [PATCH 2/5] Bump MongoDB PHP driver to v1.15.0 --- scripts/features/mongodb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/features/mongodb.sh b/scripts/features/mongodb.sh index e919651c6..faaeca6aa 100755 --- a/scripts/features/mongodb.sh +++ b/scripts/features/mongodb.sh @@ -41,7 +41,7 @@ sudo systemctl enable mongod sudo systemctl start mongod sudo rm -rf /tmp/mongo-php-driver /usr/src/mongo-php-driver -git clone -c advice.detachedHead=false -q -b '1.14.2' --single-branch https://github.com/mongodb/mongo-php-driver.git /tmp/mongo-php-driver +git clone -c advice.detachedHead=false -q -b '1.15.0' --single-branch https://github.com/mongodb/mongo-php-driver.git /tmp/mongo-php-driver sudo mv /tmp/mongo-php-driver /usr/src/mongo-php-driver cd /usr/src/mongo-php-driver git submodule -q update --init From 13a16082b2b8aeeee15b75e3b03c5c1ad6d91bc0 Mon Sep 17 00:00:00 2001 From: Dusan Maric Date: Wed, 18 Jan 2023 10:23:48 +0100 Subject: [PATCH 3/5] Install PHP8.2 MongoDB extension --- scripts/features/mongodb.sh | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/scripts/features/mongodb.sh b/scripts/features/mongodb.sh index faaeca6aa..c837aa31a 100755 --- a/scripts/features/mongodb.sh +++ b/scripts/features/mongodb.sh @@ -140,14 +140,27 @@ then sudo service php8.0-fpm restart fi -phpize8.1 -./configure --with-php-config=/usr/bin/php-config8.1 > /dev/null +if [ -f /home/$WSL_USER_NAME/.homestead-features/php80 ] +then + phpize8.1 + ./configure --with-php-config=/usr/bin/php-config8.1 > /dev/null + make clean > /dev/null + make >/dev/null 2>&1 + sudo make install + sudo bash -c "echo 'extension=mongodb.so' > /etc/php/8.1/mods-available/mongo.ini" + sudo ln -s /etc/php/8.1/mods-available/mongo.ini /etc/php/8.1/cli/conf.d/20-mongo.ini + sudo ln -s /etc/php/8.1/mods-available/mongo.ini /etc/php/8.1/fpm/conf.d/20-mongo.ini + sudo service php8.1-fpm restart +fi + +phpize8.2 +./configure --with-php-config=/usr/bin/php-config8.2 > /dev/null make clean > /dev/null make >/dev/null 2>&1 sudo make install -sudo bash -c "echo 'extension=mongodb.so' > /etc/php/8.1/mods-available/mongo.ini" -sudo ln -s /etc/php/8.1/mods-available/mongo.ini /etc/php/8.1/cli/conf.d/20-mongo.ini -sudo ln -s /etc/php/8.1/mods-available/mongo.ini /etc/php/8.1/fpm/conf.d/20-mongo.ini -sudo service php8.1-fpm restart +sudo bash -c "echo 'extension=mongodb.so' > /etc/php/8.2/mods-available/mongo.ini" +sudo ln -s /etc/php/8.2/mods-available/mongo.ini /etc/php/8.2/cli/conf.d/20-mongo.ini +sudo ln -s /etc/php/8.2/mods-available/mongo.ini /etc/php/8.2/fpm/conf.d/20-mongo.ini +sudo service php8.2-fpm restart mongosh admin --eval "db.createUser({user:'homestead',pwd:'secret',roles:['root']})" From 94b5f193a18a6532984f4550db94a3b950765b4a Mon Sep 17 00:00:00 2001 From: Dusan Maric Date: Wed, 18 Jan 2023 10:25:40 +0100 Subject: [PATCH 4/5] mongodb.sh: fix copy'n'paste issue --- scripts/features/mongodb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/features/mongodb.sh b/scripts/features/mongodb.sh index c837aa31a..3c0dfb44e 100755 --- a/scripts/features/mongodb.sh +++ b/scripts/features/mongodb.sh @@ -140,7 +140,7 @@ then sudo service php8.0-fpm restart fi -if [ -f /home/$WSL_USER_NAME/.homestead-features/php80 ] +if [ -f /home/$WSL_USER_NAME/.homestead-features/php81 ] then phpize8.1 ./configure --with-php-config=/usr/bin/php-config8.1 > /dev/null From 08b4d547b1f3fc37f71984b9a1ca09603b4b107a Mon Sep 17 00:00:00 2001 From: Dusan Maric Date: Wed, 30 Aug 2023 11:57:11 +0200 Subject: [PATCH 5/5] Features: mongodb: bump PHP driver to v1.16.2 --- scripts/features/mongodb.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/features/mongodb.sh b/scripts/features/mongodb.sh index 3c0dfb44e..ebcfcfab6 100755 --- a/scripts/features/mongodb.sh +++ b/scripts/features/mongodb.sh @@ -21,7 +21,6 @@ ARCH=$(arch) touch /home/$WSL_USER_NAME/.homestead-features/mongodb chown -Rf $WSL_USER_NAME:$WSL_USER_GROUP /home/$WSL_USER_NAME/.homestead-features - if [[ "$ARCH" == "aarch64" ]]; then echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list else @@ -41,7 +40,7 @@ sudo systemctl enable mongod sudo systemctl start mongod sudo rm -rf /tmp/mongo-php-driver /usr/src/mongo-php-driver -git clone -c advice.detachedHead=false -q -b '1.15.0' --single-branch https://github.com/mongodb/mongo-php-driver.git /tmp/mongo-php-driver +git clone -c advice.detachedHead=false -q -b '1.16.2' --single-branch https://github.com/mongodb/mongo-php-driver.git /tmp/mongo-php-driver sudo mv /tmp/mongo-php-driver /usr/src/mongo-php-driver cd /usr/src/mongo-php-driver git submodule -q update --init