Skip to content

Commit a89c9ac

Browse files
authored
Merge pull request #66 from catalyst/3.9-support
Issue #65 - 3.9 support
2 parents 9480daa + 6eab19a commit a89c9ac

File tree

4 files changed

+69
-18
lines changed

4 files changed

+69
-18
lines changed

.travis.yml

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ addons:
44
apt:
55
packages:
66
- openjdk-8-jre
7-
postgresql: "9.5"
7+
postgresql: "9.6"
88

99
notifications:
1010
email:
@@ -21,6 +21,8 @@ php:
2121
- 7.0
2222
- 7.1
2323
- 7.2
24+
- 7.3
25+
- 7.4
2426

2527
env:
2628
global:
@@ -32,10 +34,6 @@ env:
3234
- DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
3335
- DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
3436
- DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
35-
- DB=pgsql MOODLE_BRANCH=MOODLE_36_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
36-
- DB=pgsql MOODLE_BRANCH=MOODLE_36_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
37-
- DB=pgsql MOODLE_BRANCH=MOODLE_36_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
38-
- DB=pgsql MOODLE_BRANCH=MOODLE_36_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
3937
- DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
4038
- DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
4139
- DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
@@ -44,6 +42,10 @@ env:
4442
- DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
4543
- DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
4644
- DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
45+
- DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
46+
- DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
47+
- DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
48+
- DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
4749
- DB=pgsql MOODLE_BRANCH=master ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
4850
- DB=pgsql MOODLE_BRANCH=master ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
4951
- DB=pgsql MOODLE_BRANCH=master ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
@@ -59,6 +61,14 @@ matrix:
5961
env: DB=pgsql MOODLE_BRANCH=master ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
6062
- php: 7.0
6163
env: DB=pgsql MOODLE_BRANCH=master ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
64+
- php: 7.0
65+
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
66+
- php: 7.0
67+
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
68+
- php: 7.0
69+
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
70+
- php: 7.0
71+
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
6272
- php: 7.0
6373
env: DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
6474
- php: 7.0
@@ -67,6 +77,14 @@ matrix:
6777
env: DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
6878
- php: 7.0
6979
env: DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
80+
- php: 7.0
81+
env: DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
82+
- php: 7.0
83+
env: DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
84+
- php: 7.0
85+
env: DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
86+
- php: 7.0
87+
env: DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
7088
- php: 7.1
7189
env: DB=pgsql MOODLE_BRANCH=master ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
7290
- php: 7.1
@@ -75,20 +93,53 @@ matrix:
7593
env: DB=pgsql MOODLE_BRANCH=master ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
7694
- php: 7.1
7795
env: DB=pgsql MOODLE_BRANCH=master ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
78-
- php: 7.0
96+
- php: 7.1
97+
env: DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
98+
- php: 7.1
99+
env: DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
100+
- php: 7.1
101+
env: DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
102+
- php: 7.1
103+
env: DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
104+
- php: 7.1
105+
env: DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
106+
- php: 7.1
107+
env: DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
108+
- php: 7.1
109+
env: DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
110+
- php: 7.1
111+
env: DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
112+
113+
- php: 7.3
114+
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
115+
- php: 7.3
116+
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
117+
- php: 7.3
118+
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
119+
- php: 7.3
120+
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
121+
- php: 7.4
122+
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
123+
- php: 7.4
124+
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
125+
- php: 7.4
126+
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
127+
- php: 7.4
128+
env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
129+
- php: 7.4
79130
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.0.deb
80-
- php: 7.0
131+
- php: 7.4
81132
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=6.0.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.0.deb
82-
- php: 7.0
133+
- php: 7.4
83134
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=6.4.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.4.1.deb
84-
- php: 7.0
135+
- php: 7.4
85136
env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE ESVER=6.6.1 ESURL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.1.deb
86137

87138
before_install:
88139
- curl -O ${ESURL} && sudo dpkg -i --force-confnew elasticsearch-${ESVER}.deb && sudo service elasticsearch restart
89140
- cd ../..
90141
- composer selfupdate
91-
- composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1
142+
- composer create-project -n --no-dev moodlehq/moodle-plugin-ci ci ^1
92143
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
93144

94145
install:
@@ -100,10 +151,7 @@ before_script:
100151

101152
script:
102153
- moodle-plugin-ci phplint
103-
# - moodle-plugin-ci phpcpd
104-
# - moodle-plugin-ci phpmd
105154
- moodle-plugin-ci codechecker
106155
- moodle-plugin-ci validate
107156
- moodle-plugin-ci shifter
108157
- moodle-plugin-ci phpunit
109-
- moodle-plugin-ci behat # No tests yet

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ The following features are provided by this plugin:
1515
## Supported Moodle Versions
1616
This plugin currently supports Moodle:
1717

18-
* 3.5
19-
* 3.6
20-
* 3.7
18+
* 3.5+
2119

2220
## Elasticsearch Version Support
2321
Currently this plugin is tested to work against the following versions of Elasticsearch:

classes/engine.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,11 @@ public function add_documents($iterator, $searcharea, $options) {
548548
$numdocsignored += $this->batch_add_documents(false, true, true);
549549
$numdocs = $numrecords - $numdocsignored;
550550

551+
if (method_exists($this, 'supports_add_document_batch')) {
552+
$numbatches = 0; // TODO: fix https://github.com/catalyst/moodle-search_elastic/issues/67.
553+
return array($numrecords, $numdocs, $numdocsignored, $lastindexeddoc, $partial, $numbatches);
554+
}
555+
551556
return array($numrecords, $numdocs, $numdocsignored, $lastindexeddoc, $partial);
552557
}
553558

version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
defined('MOODLE_INTERNAL') || die();
2626

27-
$plugin->version = 2020061500;
28-
$plugin->release = 2020061500; // Same as version.
27+
$plugin->version = 2020101200;
28+
$plugin->release = 2020101200; // Same as version.
2929
$plugin->requires = 2016052304;
3030
$plugin->component = 'search_elastic';
3131
$plugin->maturity = MATURITY_STABLE;

0 commit comments

Comments
 (0)