Skip to content

Commit b12a5f1

Browse files
committed
PHPLIB-1482: Skip range V1 tests on ext-mongodb 1.20+
ext-mongodb 1.20 uses libmongoc 1.28, which enables range V2 from libmongocrypt 1.10+ and drops support for range V1.
1 parent 0d9c466 commit b12a5f1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/SpecTests/ClientSideEncryption/Prose22_RangeExplicitEncryptionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
use function file_get_contents;
2121
use function get_debug_type;
2222
use function is_int;
23+
use function phpversion;
24+
use function version_compare;
2325

2426
/**
2527
* Prose test 22: Range Explicit Encryption
@@ -39,6 +41,10 @@ public function setUp(): void
3941
{
4042
parent::setUp();
4143

44+
if (version_compare(phpversion('mongodb'), '1.20.0dev', '>=')) {
45+
$this->markTestIncomplete('Range protocol V1 is not supported by ext-mongodb 1.20+');
46+
}
47+
4248
if ($this->isStandalone()) {
4349
$this->markTestSkipped('Range explicit encryption tests require replica sets');
4450
}

tests/SpecTests/ClientSideEncryptionSpecTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@
3838
use function in_array;
3939
use function iterator_to_array;
4040
use function json_decode;
41+
use function phpversion;
4142
use function sprintf;
4243
use function str_repeat;
44+
use function str_starts_with;
4345
use function substr;
46+
use function version_compare;
4447

4548
use const JSON_THROW_ON_ERROR;
4649

@@ -163,6 +166,10 @@ public function testClientSideEncryption(stdClass $test, ?array $runOn, array $d
163166
$this->markTestIncomplete(self::$incompleteTests[$this->dataDescription()]);
164167
}
165168

169+
if (str_starts_with($this->dataDescription(), 'fle2v2-Range-') && version_compare(phpversion('mongodb'), '1.20.0dev', '>=')) {
170+
$this->markTestIncomplete('Range protocol V1 is not supported by ext-mongodb 1.20+');
171+
}
172+
166173
if (isset($runOn)) {
167174
$this->checkServerRequirements($runOn);
168175
}

0 commit comments

Comments
 (0)