Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- dependencies: "lowest"
php-version: "8.1"
mongodb-version: "6.0"
driver-version: "1.21.0"
driver-version: "2.1.0"
topology: "server"
symfony-version: "stable"
proxy: "lazy-ghost"
Expand Down Expand Up @@ -84,14 +84,6 @@ jobs:
dependencies: "highest"
symfony-version: "stable"
proxy: "native"
# Test with extension 1.21
- topology: "server"
php-version: "8.2"
mongodb-version: "8.0"
driver-version: "1.21.0"
dependencies: "highest"
symfony-version: "stable"
proxy: "lazy-ghost"
# Test with a sharded cluster
# Currently disabled due to a bug where MongoDB reports "sharding status unknown"
# - topology: "sharded_cluster"
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
},
"require": {
"php": "^8.1",
"ext-mongodb": "^1.21 || ^2.0",
"ext-mongodb": "^2.0",
"composer-runtime-api": "^2.0",
"doctrine/cache": "^1.11 || ^2.0",
"doctrine/collections": "^1.5 || ^2.0",
"doctrine/event-manager": "^1.0 || ^2.0",
"doctrine/instantiator": "^1.1 || ^2",
"doctrine/persistence": "^3.2 || ^4",
"friendsofphp/proxy-manager-lts": "^1.0",
"mongodb/mongodb": "^1.21.2 || ^2.1.1",
"mongodb/mongodb": "^2.1.1",
"psr/cache": "^1.0 || ^2.0 || ^3.0",
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"symfony/deprecation-contracts": "^2.2 || ^3.0",
Expand Down
12 changes: 0 additions & 12 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1110,18 +1110,6 @@ parameters:
count: 1
path: tests/Tests/QueryTest.php

-
message: '#^Instantiated class MongoDB\\Model\\CollectionInfoCommandIterator not found\.$#'
identifier: class.notFound
count: 1
path: tests/Tests/SchemaManagerTest.php

-
message: '#^Instantiated class MongoDB\\Model\\IndexInfoIteratorIterator not found\.$#'
identifier: class.notFound
count: 1
path: tests/Tests/SchemaManagerTest.php

-
message: '#^Method Doctrine\\ODM\\MongoDB\\Tests\\SchemaManagerTest\:\:createCollectionIterator\(\) has parameter \$collections with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down
13 changes: 0 additions & 13 deletions tests/Tests/SchemaManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@
use MongoDB\Driver\WriteConcern;
use MongoDB\GridFS\Bucket;
use MongoDB\Model\CollectionInfo;
use MongoDB\Model\CollectionInfoCommandIterator;
use MongoDB\Model\CollectionInfoIterator;
use MongoDB\Model\IndexInfo;
use MongoDB\Model\IndexInfoIterator;
use MongoDB\Model\IndexInfoIteratorIterator;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use PHPUnit\Framework\Constraint\ArrayHasKey;
Expand All @@ -55,7 +51,6 @@
use function array_map;
use function assert;
use function in_array;
use function interface_exists;

/**
* @phpstan-import-type IndexMapping from ClassMetadata
Expand Down Expand Up @@ -1483,10 +1478,6 @@ private function createSearchIndexCommandExceptionForOlderServers(): CommandExce

private function createIndexIterator(array $indexes = []): Iterator
{
if (interface_exists(IndexInfoIterator::class)) {
return new IndexInfoIteratorIterator(new ArrayIterator($indexes));
}

return new ArrayIterator(array_map(
static fn (array $indexInfo) => new IndexInfo($indexInfo),
$indexes,
Expand All @@ -1495,10 +1486,6 @@ private function createIndexIterator(array $indexes = []): Iterator

private function createCollectionIterator(array $collections = []): Iterator
{
if (interface_exists(CollectionInfoIterator::class)) {
return new CollectionInfoCommandIterator(new ArrayIterator($collections));
}

return new ArrayIterator(array_map(
static fn (array $collectionInfo) => new CollectionInfo($collectionInfo),
$collections,
Expand Down