Skip to content

Fix CI on 2.0.x - #31

Merged
DavidBadura merged 2 commits into
2.0.xfrom
ci-2.0.x
Nov 7, 2026
Merged

DavidBadura merged 2 commits into
2.0.xfrom
ci-2.0.x

Conversation

@DavidBadura

Copy link
Copy Markdown
Member

Two things broke CI on 2.0.x independent of any change here. PHPStan 2.2 types variadic parameters as arrays with possible string keys, so insertMany() and bulkWrite() complained and the baseline entries stopped matching; normalizing the objects with array_values() fixes that and also makes the $objects[0] access safe for named arguments. And MongoDB 8.x refuses to start on the GitHub runners since their kernel is 6.19 or newer (SERVER-121912), so the matrix now runs 6.0, 7.0 and 9.0.

PHPStan 2.2 types variadic parameters as arrays that may have string keys, so
the objects passed on to insertMany() and bulkWrite() no longer satisfied the
list types and the baseline entries stopped matching. Normalizing the objects
with array_values() also makes the $objects[0] access safe when a repository is
called with named arguments.

The mapping methods now declare that they throw UnknownPropertyPath, which
PHPStan needs to accept a call whose result is unused in the tests.
MongoDB 8.x refuses to start on the current GitHub runners because their
kernel is 6.19 or newer (SERVER-121912). 9.0 starts fine.
@DavidBadura
DavidBadura merged commit a4f9125 into 2.0.x Nov 7, 2026
18 of 20 checks passed
@DavidBadura
DavidBadura deleted the ci-2.0.x branch November 7, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant