Skip to content

Commit

Permalink
disableMD5 option is allowed in the spec, but ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
GromNaN committed Oct 30, 2024
1 parent 3317992 commit 15fc90a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion tests/UnifiedSpecTests/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,10 @@ private function createSession(string $id, stdClass $o): void

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

$databaseId = $o->database ?? null;
assertIsString($databaseId);
Expand Down
3 changes: 0 additions & 3 deletions tests/UnifiedSpecTests/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,6 @@ private function executeForBucket(Bucket $bucket)
{
$args = $this->prepareArguments();

// "md5" field is removed from the spec, option "disableMD5" is ignored
unset($args['disableMD5']);

Util::assertArgumentsBySchema(Bucket::class, $this->name, $args);

switch ($this->name) {
Expand Down

0 comments on commit 15fc90a

Please sign in to comment.