From e134a4296319c421b57fafba25b8b34f5e10f721 Mon Sep 17 00:00:00 2001 From: Ferran Recio Date: Fri, 22 Jan 2021 14:40:59 +0100 Subject: [PATCH] MDL-70309 libraries: upgrade mongodb integration files --- cache/stores/mongodb/lib.php | 2 +- cache/stores/mongodb/readme_moodle.txt | 3 ++- cache/stores/mongodb/thirdpartylibs.xml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cache/stores/mongodb/lib.php b/cache/stores/mongodb/lib.php index 20fe822870c..7e4b950eb8b 100644 --- a/cache/stores/mongodb/lib.php +++ b/cache/stores/mongodb/lib.php @@ -158,7 +158,7 @@ class cachestore_mongodb extends cache_store implements cache_is_configurable { * @return bool */ public static function are_requirements_met() { - return version_compare(phpversion('mongodb'), '1.5', 'ge'); + return version_compare(phpversion('mongodb'), '1.8', 'ge'); } /** diff --git a/cache/stores/mongodb/readme_moodle.txt b/cache/stores/mongodb/readme_moodle.txt index 33283da33a2..aa51dad8154 100644 --- a/cache/stores/mongodb/readme_moodle.txt +++ b/cache/stores/mongodb/readme_moodle.txt @@ -7,5 +7,6 @@ Import procedure: - Copy all the files and folders from the folder mongodb/src in the cache/stores/mongodb/MongoDB directory. - Copy the license file from the project root. - Update thirdpartylibs.xml with the latest version. +- Check the minim php driver version in https://docs.mongodb.com/drivers/php#compatibility and change the value in the "are_requirements_met" method if necessary. -This version (1.5.1) requires PHP mongodb extension >= 1.6.0 +This version (1.8.0) requires PHP mongodb extension >= 1.8.0 diff --git a/cache/stores/mongodb/thirdpartylibs.xml b/cache/stores/mongodb/thirdpartylibs.xml index f92af41ed07..48540c05e75 100644 --- a/cache/stores/mongodb/thirdpartylibs.xml +++ b/cache/stores/mongodb/thirdpartylibs.xml @@ -4,7 +4,7 @@ MongoDB MongoDB PHP Library Apache - 1.5.1 + 1.8.0 2.0 \ No newline at end of file