diff --git a/.travis.yml b/.travis.yml
index e6e8a01ba7ef90805dbcaaf110665c4db1944a12..9df8faf88b5aa20bc9f4564025e0bf54039ac5d2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
 language: php
 
 addons:
-  postgresql: "9.4"
+  postgresql: "9.5"
 
 services:
   - mysql
@@ -14,13 +14,13 @@ cache:
     - $HOME/.npm
 
 php:
-  - 7.1
   - 7.2
   - 7.3
+  - 7.4
 
 env:
   global:
-    - MOODLE_BRANCH=MOODLE_38_STABLE
+    - MOODLE_BRANCH=MOODLE_39_STABLE
   matrix:
     - DB=pgsql
     - DB=mysqli
diff --git a/CHANGES.md b/CHANGES.md
index 5307c1dedee63c6f861b6d12f22f43c19502f9ca..2aedc1bed7ec7a1c9d18835c2c1a34e4f0fde9dc 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,7 @@ Changes
 
 ### Unreleased
 
+* 2020-09-18 - Prepare compatibility for Moodle 3.9.
 * 2020-02-26 - Added Behat tests.
 
 ### v3.8-r1
diff --git a/README.md b/README.md
index 38fbf3f75127097024622ca5fc723a604b492216..70b9c434edccc89c0b8ec0f3f7b0576300b554d2 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ Moodle authentication plugin which provides all functionality of auth_ldap, but
 Requirements
 ------------
 
-This plugin requires Moodle 3.8+
+This plugin requires Moodle 3.9+
 
 
 Motivation for this plugin
diff --git a/version.php b/version.php
index e1054548b288871776e9f64c50463a206f3aecee..db5cf3efd0e01088cf92e53f73ece338d4fde7b1 100644
--- a/version.php
+++ b/version.php
@@ -27,6 +27,6 @@ defined('MOODLE_INTERNAL') || die();
 $plugin->component = 'auth_ldap_syncplus';
 $plugin->version = 2020021900;
 $plugin->release = 'v3.8-r1';
-$plugin->requires = 2019111800;
+$plugin->requires = 2020061500;
 $plugin->maturity = MATURITY_STABLE;
-$plugin->dependencies = array('auth_ldap' => 2019111800);
+$plugin->dependencies = array('auth_ldap' => 2020061500);