Skip to content

Commit ea7489b

Browse files
committed
PHPC-1369: Update libmongoc to latest 1.15-dev
1 parent 56497bd commit ea7489b

File tree

6 files changed

+57
-2
lines changed

6 files changed

+57
-2
lines changed

config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ if (PHP_MONGODB != "no") {
148148
MONGOC_ENABLE_CRYPTO_SYSTEM_PROFILE: 0,
149149
MONGOC_ENABLE_COMPRESSION_SNAPPY: 0,
150150
MONGOC_ENABLE_COMPRESSION_ZLIB: 0,
151+
MONGOC_ENABLE_COMPRESSION_ZSTD: 0,
151152
MONGOC_ENABLE_COMPRESSION: 0,
152153
MONGOC_ENABLE_SASL: 0,
153154
MONGOC_ENABLE_SASL_CYRUS: 0,

scripts/autotools/libmongoc/CheckCompression.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ else
6464
AC_SUBST(MONGOC_ENABLE_COMPRESSION_ZLIB, 0)
6565
AC_SUBST(MONGOC_ENABLE_COMPRESSION_SNAPPY, 0)
6666
fi
67+
68+
AC_SUBST(MONGOC_ENABLE_COMPRESSION_ZSTD, 0)

src/libmongoc

Submodule libmongoc updated 173 files

tests/bulk/bulkwrite-update_error-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ OK: Got MongoDB\Driver\Exception\InvalidArgumentException
3434
invalid argument for update: corrupt BSON
3535

3636
OK: Got MongoDB\Driver\Exception\InvalidArgumentException
37-
Invalid key 'z': update only works with $ operators
37+
Invalid key 'z': update only works with $ operators and pipelines
3838
===DONE===

tests/server/server-executeCommand-006.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ MongoDB\Driver\Server::executeCommand() options (MONGO_CMD_RAW)
33
--SKIPIF--
44
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
55
<?php skip_if_not_live(); ?>
6+
<?php skip_if_standalone(); ?>
67
<?php skip_if_not_clean(); ?>
78
<?php skip_if_server_version('<', '3.6'); ?>
89
--FILE--
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
--TEST--
2+
MongoDB\Driver\Server::executeCommand() does not send read preference to standalone
3+
--SKIPIF--
4+
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
5+
<?php skip_if_not_live(); ?>
6+
<?php skip_if_not_standalone(); ?>
7+
<?php skip_if_not_clean(); ?>
8+
<?php skip_if_server_version('<', '3.6'); ?>
9+
--FILE--
10+
<?php
11+
require_once __DIR__ . "/../utils/basic.inc";
12+
require_once __DIR__ . "/../utils/observer.php";
13+
14+
$manager = new MongoDB\Driver\Manager(URI);
15+
$server = $manager->selectServer(new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY));
16+
17+
(new CommandObserver)->observe(
18+
function() use ($server) {
19+
$command = new MongoDB\Driver\Command([
20+
'ping' => true,
21+
]);
22+
23+
try {
24+
$server->executeCommand(
25+
DATABASE_NAME,
26+
$command,
27+
[
28+
'readPreference' => new \MongoDB\Driver\ReadPreference(\MongoDB\Driver\ReadPreference::RP_SECONDARY),
29+
'readConcern' => new \MongoDB\Driver\ReadConcern(\MongoDB\Driver\ReadConcern::LOCAL),
30+
'writeConcern' => new \MongoDB\Driver\WriteConcern(\MongoDB\Driver\WriteConcern::MAJORITY),
31+
]
32+
);
33+
} catch ( Exception $e ) {
34+
// Ignore exception that ping doesn't support writeConcern
35+
}
36+
},
37+
function(stdClass $command) {
38+
echo isset($command->{'$readPreference'}) ? 'Read preference set' : 'No read preference set', "\n";
39+
echo "Read Concern: ", $command->readConcern->level, "\n";
40+
echo "Write Concern: ", $command->writeConcern->w, "\n";
41+
}
42+
);
43+
44+
?>
45+
===DONE===
46+
<?php exit(0); ?>
47+
--EXPECTF--
48+
No read preference set
49+
Read Concern: local
50+
Write Concern: majority
51+
===DONE===

0 commit comments

Comments
 (0)