Repository navigation
Fix CI on 2.0.x - #31
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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()andbulkWrite()complained and the baseline entries stopped matching; normalizing the objects witharray_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.