Skip to content

Commit 14de1e3

Browse files
committed
PHPC-995: Drop support for MongoDB 2.4
1 parent 9d3b99e commit 14de1e3

File tree

8 files changed

+1
-88
lines changed

8 files changed

+1
-88
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ URIs and resemble the following:
3030
```
3131
{
3232
"STANDALONE": "mongodb:\/\/192.168.112.10:2000",
33-
"STANDALONE_24": "mongodb:\/\/192.168.112.10:2500",
3433
"STANDALONE_26": "mongodb:\/\/192.168.112.10:2600",
3534
"STANDALONE_30": "mongodb:\/\/192.168.112.10:2700",
3635
"STANDALONE_SSL": "mongodb:\/\/192.168.112.10:2100",

scripts/presets/standalone-24.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

scripts/start-servers.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ function lap() {
1919
$PRESETS = [
2020
"standalone" => [
2121
"scripts/presets/standalone.json",
22-
"scripts/presets/standalone-24.json",
2322
"scripts/presets/standalone-26.json",
2423
"scripts/presets/standalone-30.json",
2524
"scripts/presets/standalone-ssl.json",
@@ -124,7 +123,6 @@ function mo_http_request($uri, $context) {
124123
wget --body-data='' --method='GET' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers
125124
wget --body-data='' --method='DELETE' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers/STANDALONE-AUTH
126125
wget --body-data='' --method='DELETE' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers/STANDALONE
127-
wget --body-data='' --method='DELETE' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers/STANDALONE-24
128126
wget --body-data='' --method='DELETE' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers/STANDALONE-26
129127
wget --body-data='' --method='DELETE' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers/RS-two
130128
wget --body-data='' --method='DELETE' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers/RS-arbiter
@@ -141,7 +139,6 @@ function mo_http_request($uri, $context) {
141139
wget --body-data='' --method='GET' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/replica_sets
142140
143141
wget --body-data='{"preset":"\/phongo\/\/scripts\/presets\/standalone.json"}' --method='POST' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers
144-
wget --body-data='{"preset":"\/phongo\/\/scripts\/presets\/standalone-24.json"}' --method='POST' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers
145142
wget --body-data='{"preset":"\/phongo\/\/scripts\/presets\/standalone-26.json"}' --method='POST' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers
146143
wget --body-data='{"preset":"\/phongo\/\/scripts\/presets\/standalone-ssl.json"}' --method='POST' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers
147144
wget --body-data='{"preset":"\/phongo\/\/scripts\/presets\/standalone-auth.json"}' --method='POST' --header='Accept: application/json' --header='Content-type: application/x-www-form-urlencoded' http://192.168.112.10:8889/servers

scripts/ubuntu/mongo-orchestration-config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"releases": {
33
"32-release": "/home/vagrant/3.2.0/usr/bin",
44
"30-release": "/home/vagrant/3.0.3/usr/bin",
5-
"26-release": "/home/vagrant/2.6.9/usr/bin",
6-
"24-release": "/home/vagrant/2.4.13/usr/bin"
5+
"26-release": "/home/vagrant/2.6.9/usr/bin"
76
}
87
}

scripts/ubuntu/mongo-orchestration.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
55
echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/3.2 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-3.2.list
66
echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/3.0 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-3.0.list
77
echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/2.6 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-2.6.list
8-
echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/2.4 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-2.4.list
98
apt-get update
109

1110
apt-get install -y libsnmp15 libgsasl7
@@ -14,8 +13,6 @@ sudo apt-get download mongodb-enterprise-server=3.2.0
1413
sudo apt-get download mongodb-enterprise-mongos=3.2.0
1514
sudo apt-get download mongodb-enterprise-server=3.0.3
1615
sudo apt-get download mongodb-enterprise-server=2.6.9
17-
sudo apt-get download mongodb-10gen-enterprise=2.4.13
18-
dpkg -x mongodb-10gen-enterprise_2.4.13_amd64.deb 2.4.13
1916
dpkg -x mongodb-enterprise-server_2.6.9_amd64.deb 2.6.9
2017
dpkg -x mongodb-enterprise-server_3.0.3_amd64.deb 3.0.3
2118
dpkg -x mongodb-enterprise-server_3.2.0_amd64.deb 3.2.0

src/MongoDB/BulkWrite.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,6 @@
3131

3232
zend_class_entry *php_phongo_bulkwrite_ce;
3333

34-
/* Returns whether the insert document appears to be a legacy index. */
35-
static inline bool php_phongo_bulkwrite_insert_is_legacy_index(bson_t *bdocument) /* {{{ */
36-
{
37-
bson_iter_t iter;
38-
39-
if (bson_iter_init_find(&iter, bdocument, "key") && BSON_ITER_HOLDS_DOCUMENT(&iter) &&
40-
bson_iter_init_find(&iter, bdocument, "name") && BSON_ITER_HOLDS_UTF8(&iter) &&
41-
bson_iter_init_find(&iter, bdocument, "ns") && BSON_ITER_HOLDS_UTF8(&iter)) {
42-
return true;
43-
}
44-
45-
return false;
46-
} /* }}} */
47-
4834
/* Extracts the "_id" field of a BSON document into a return value. */
4935
static void php_phongo_bulkwrite_extract_id(bson_t *doc, zval **return_value) /* {{{ */
5036
{
@@ -243,21 +229,6 @@ static PHP_METHOD(BulkWrite, insert)
243229
goto cleanup;
244230
}
245231

246-
/* If the insert document appears to be a legacy index, instruct libmongoc
247-
* to allow dots in BSON keys by setting the "legacyIndex" option.
248-
*
249-
* Note: php_phongo_zval_to_bson() may have added an ObjectId if the "_id"
250-
* field was unset. We don't know at this point if the insert is destined
251-
* for a pre-2.6 server's "system.indexes" collection, but legacy index
252-
* creation will ignore the "_id" so there is no harm in leaving it. In the
253-
* event php_phongo_bulkwrite_insert_is_legacy_index() returns a false
254-
* positive, we absolutely want ObjectId added if "_id" was unset. */
255-
if (php_phongo_bulkwrite_insert_is_legacy_index(&bdocument) &&
256-
!BSON_APPEND_BOOL(&boptions, "legacyIndex", true)) {
257-
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT TSRMLS_CC, "Error appending \"legacyIndex\" option");
258-
goto cleanup;
259-
}
260-
261232
if (!mongoc_bulk_operation_insert_with_opts(intern->bulk, &bdocument, &boptions, &error)) {
262233
phongo_throw_exception_from_bson_error_t(&error TSRMLS_CC);
263234
goto cleanup;

tests/bulk/bulkwrite-insert_error-004.phpt

Lines changed: 0 additions & 34 deletions
This file was deleted.

tests/utils/basic.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ if (!$config) {
1313

1414
$servers = array(
1515
"STANDALONE" => "",
16-
"STANDALONE_24" => "",
1716
"STANDALONE_26" => "",
1817
"STANDALONE_30" => "",
1918
"STANDALONE_SSL" => "",

0 commit comments

Comments
 (0)