doctrine / mongodb-odm

The Official PHP MongoDB ORM/ODM
https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/
MIT License
1.09k stars 502 forks source link

Duplicate objectToArray keys in AggregationOperatorsProviderTrait #2624

Closed jmikola closed 4 months ago

jmikola commented 5 months ago

Bug Report

Q A
BC Break no
Version 2.6.0

Summary

https://github.com/doctrine/mongodb-odm/commit/21a66c26c100e0389d6d1d7ee6fec0002ede5e4e for https://github.com/doctrine/mongodb-odm/pull/2514 introduced duplicate data provider keys in AggregationOperatorsProviderTrait. It's possible that the issue only arose after the PHPUnit dependency was bumped in https://github.com/doctrine/mongodb-odm/commit/0aa0e7b9ee31148a0e522aa1fb42fb7f4459c2c8 (also for 2.6.0).

Current behavior

I observed the following test failures in this CI job for #2623:

1) Doctrine\ODM\MongoDB\Tests\Aggregation\ExprTest::testGenericOperator
The data provider specified for Doctrine\ODM\MongoDB\Tests\Aggregation\ExprTest::testGenericOperator is invalid
The key "objectToArray" has already been defined by a previous data provider

/home/runner/work/mongodb-odm/mongodb-odm/tests/Doctrine/ODM/MongoDB/Tests/Aggregation/ExprTest.php:40

2) Doctrine\ODM\MongoDB\Tests\Aggregation\ExprTest::testGenericOperatorWithField
The data provider specified for Doctrine\ODM\MongoDB\Tests\Aggregation\ExprTest::testGenericOperatorWithField is invalid
The key "objectToArray" has already been defined by a previous data provider

/home/runner/work/mongodb-odm/mongodb-odm/tests/Doctrine/ODM/MongoDB/Tests/Aggregation/ExprTest.php:71

3) Doctrine\ODM\MongoDB\Tests\Aggregation\Stage\OperatorTest::testProxiedExpressionOperators
The data provider specified for Doctrine\ODM\MongoDB\Tests\Aggregation\Stage\OperatorTest::testProxiedExpressionOperators is invalid
The key "objectToArray" has already been defined by a previous data provider

/home/runner/work/mongodb-odm/mongodb-odm/tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/OperatorTest.php:40
jmikola commented 4 months ago

Fixed by https://github.com/doctrine/mongodb-odm/pull/2629