Skip to content

WIP: Support version 2.0 of the MongoDB driver #1478

WIP: Support version 2.0 of the MongoDB driver

WIP: Support version 2.0 of the MongoDB driver #1478

Triggered via pull request October 1, 2024 11:37
Status Failure
Total duration 1m 2s
Artifacts 2

static-analysis.yml

on: pull_request
Matrix: Static Analysis with PHPStan
Matrix: Static Analysis with Psalm
Fit to window
Zoom out
Zoom in

Annotations

18 errors
Static Analysis with PHPStan (8.2): tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L563
Return type (MongoDB\BSON\Int64) of method class@anonymous/tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:562::getId() should be compatible with return type (MongoDB\Driver\CursorId) of method MongoDB\Driver\CursorInterface::getId()
Static Analysis with PHPStan (8.2): tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L578
Method class@anonymous/tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:562::setTypeMap() has parameter $typemap with no value type specified in iterable type array.
Static Analysis with PHPStan (8.2): tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L582
Method class@anonymous/tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:562::toArray() return type has no value type specified in iterable type array.
Static Analysis with PHPStan (8.2): tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L587
Method class@anonymous/tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:562::current() return type has no value type specified in iterable type array.
Static Analysis with PHPStan (8.2): tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L627
Method Doctrine\ODM\MongoDB\Tests\QueryTest::createCursorMock() return type has no value type specified in iterable type Traversable.
Static Analysis with PHPStan (8.2): tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php#L1352
Method Doctrine\ODM\MongoDB\Tests\SchemaManagerTest::createIndexIterator() has parameter $indexes with no value type specified in iterable type array.
Static Analysis with PHPStan (8.2): tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php#L1364
Method Doctrine\ODM\MongoDB\Tests\SchemaManagerTest::createCollectionIterator() has parameter $collections with no value type specified in iterable type array.
Static Analysis with PHPStan (8.2)
Process completed with exit code 1.
MissingTemplateParam: tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L562
tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:562:23: MissingTemplateParam: Doctrine\ODM\MongoDB\Tests\_home_runner_work_mongodb_odm_mongodb_odm_tests_Doctrine_ODM_MongoDB_Tests_QueryTest_php_562_18313 has missing template params when extending ArrayIterator, expecting 2 (see https://psalm.dev/182)
MissingTemplateParam: tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L562
tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:562:73: MissingTemplateParam: Doctrine\ODM\MongoDB\Tests\_home_runner_work_mongodb_odm_mongodb_odm_tests_Doctrine_ODM_MongoDB_Tests_QueryTest_php_562_18313 has missing template params when extending MongoDB\Driver\CursorInterface, expecting 2 (see https://psalm.dev/182)
ImplementedReturnTypeMismatch: tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L563
tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:563:38: ImplementedReturnTypeMismatch: The inherited return type 'MongoDB\Driver\CursorId' for MongoDB\Driver\CursorInterface::getId is different to the implemented return type for Doctrine\ODM\MongoDB\Tests\_home_runner_work_mongodb_odm_mongodb_odm_tests_Doctrine_ODM_MongoDB_Tests_QueryTest_php_562_18313::getid 'MongoDB\BSON\Int64' (see https://psalm.dev/123)
InvalidReturnType: tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L582
tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:582:40: InvalidReturnType: The declared return type 'array<array-key, mixed>' for Doctrine\ODM\MongoDB\Tests\_home_runner_work_mongodb_odm_mongodb_odm_tests_Doctrine_ODM_MongoDB_Tests_QueryTest_php_562_18313::toArray is incorrect, got 'array<int|null, array<array-key, mixed>|null>' (see https://psalm.dev/011)
InvalidReturnStatement: tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php#L584
tests/Doctrine/ODM/MongoDB/Tests/QueryTest.php:584:24: InvalidReturnStatement: The inferred type 'array<int|null, array<array-key, mixed>|null>' does not match the declared return type 'array<array-key, mixed>' for Doctrine\ODM\MongoDB\Tests\_home_runner_work_mongodb_odm_mongodb_odm_tests_Doctrine_ODM_MongoDB_Tests_QueryTest_php_562_18313::toArray (see https://psalm.dev/128)
InternalClass: tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php#L1367
tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php:1367:20: InternalClass: MongoDB\Model\CollectionInfoCommandIterator is internal to MongoDB but called from Doctrine\ODM\MongoDB\Tests\SchemaManagerTest (see https://psalm.dev/174)
InternalMethod: tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php#L1367
tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php:1367:20: InternalMethod: Constructor MongoDB\Model\CollectionInfoCommandIterator::__construct is internal to MongoDB but called from Doctrine\ODM\MongoDB\Tests\SchemaManagerTest::createCollectionIterator (see https://psalm.dev/175)
UnusedBaselineEntry: tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php#L1
tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php:0:0: UnusedBaselineEntry: Baseline for issue "InternalClass" has 1 extra entry. (see https://psalm.dev/316)
UnusedBaselineEntry: tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php#L1
tests/Doctrine/ODM/MongoDB/Tests/SchemaManagerTest.php:0:0: UnusedBaselineEntry: Baseline for issue "InternalMethod" has 1 extra entry. (see https://psalm.dev/316)
Static Analysis with Psalm (8.2)
Process completed with exit code 2.

Artifacts

Produced during runtime
Name Size
composer-lock-static-analysis-phpstan
23.7 KB
composer-lock-static-analysis-psalm
23.7 KB