Skip to content

Commit 15fc90a

Browse files
committed
disableMD5 option is allowed in the spec, but ignored
1 parent 3317992 commit 15fc90a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/UnifiedSpecTests/Context.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,10 @@ private function createSession(string $id, stdClass $o): void
463463

464464
private function createBucket(string $id, stdClass $o): void
465465
{
466-
Util::assertHasOnlyKeys($o, ['id', 'database', 'bucketOptions']);
466+
// Option "disableMD5" is transitional while other drivers remove support
467+
// for "md5" fields. It is ignored since PHPLIB v2.0.
468+
// https://github.com/mongodb/specifications/blob/9058491f2d5b5651913a56e373121a24d6498673/source/gridfs/gridfs-spec.md?plain=1#L281-L288
469+
Util::assertHasOnlyKeys($o, ['id', 'database', 'bucketOptions', 'disableMD5']);
467470

468471
$databaseId = $o->database ?? null;
469472
assertIsString($databaseId);

tests/UnifiedSpecTests/Operation.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,9 +770,6 @@ private function executeForBucket(Bucket $bucket)
770770
{
771771
$args = $this->prepareArguments();
772772

773-
// "md5" field is removed from the spec, option "disableMD5" is ignored
774-
unset($args['disableMD5']);
775-
776773
Util::assertArgumentsBySchema(Bucket::class, $this->name, $args);
777774

778775
switch ($this->name) {

0 commit comments

Comments
 (0)