Skip to content

Commit 1e69110

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat-query-lib
# Conflicts: # src/Database/Adapter/Mongo.php # tests/e2e/Adapter/Scopes/DocumentTests.php
2 parents ec959e3 + 0b1b4b4 commit 1e69110

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Database/Adapter/Mongo.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,18 +634,18 @@ public function createCollection(string $name, array $attributes = [], array $in
634634

635635
switch ($index->type) {
636636
case IndexType::Key:
637-
$order = $this->getOrder(OrderDirection::tryFrom((string) ($orders[$j] ?? '')) ?? OrderDirection::Asc);
637+
$order = $this->getOrder(OrderDirection::tryFrom(\strtoupper((string) ($orders[$j] ?? ''))) ?? OrderDirection::Asc);
638638
break;
639639
case IndexType::Fulltext:
640640
// MongoDB fulltext index is just 'text'
641641
$order = 'text';
642642
break;
643643
case IndexType::Unique:
644-
$order = $this->getOrder(OrderDirection::tryFrom((string) ($orders[$j] ?? '')) ?? OrderDirection::Asc);
644+
$order = $this->getOrder(OrderDirection::tryFrom(\strtoupper((string) ($orders[$j] ?? ''))) ?? OrderDirection::Asc);
645645
$unique = true;
646646
break;
647647
case IndexType::Ttl:
648-
$order = $this->getOrder(OrderDirection::tryFrom((string) ($orders[$j] ?? '')) ?? OrderDirection::Asc);
648+
$order = $this->getOrder(OrderDirection::tryFrom(\strtoupper((string) ($orders[$j] ?? ''))) ?? OrderDirection::Asc);
649649
break;
650650
default:
651651
// index not supported
@@ -1030,7 +1030,7 @@ public function createIndex(string $collection, Index $index, array $indexAttrib
10301030
$attributes[$i] = $this->filter($this->getInternalKeyForAttribute($attribute));
10311031
}
10321032

1033-
$orderType = $this->getOrder(OrderDirection::tryFrom((string) ($orders[$i] ?? '')) ?? OrderDirection::Asc);
1033+
$orderType = $this->getOrder(OrderDirection::tryFrom(\strtoupper((string) ($orders[$i] ?? ''))) ?? OrderDirection::Asc);
10341034
$indexKey[$attributes[$i]] = $orderType;
10351035

10361036
switch ($type) {

0 commit comments

Comments
 (0)