Make Merger::merge() accept any kind of iterable#1186
Conversation
API Surface ChangesIf any of the additions below are not intended as public API, mark them with Modified API SurfaceMethods
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1186 +/- ##
============================================
+ Coverage 82.80% 82.83% +0.03%
- Complexity 1570 1574 +4
============================================
Files 113 113
Lines 5315 5326 +11
============================================
+ Hits 4401 4412 +11
Misses 914 914 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Nevermind; sorry for the noise. |
|
Yes, it's definitely intended :D I would like to use it in Paraunit. I've added a dedicated test for the new method. |
|
A couple of notes:
|
|
@sebastianbergmann your comments made me think that I could try a different approach: 157f66b Since Only drawback, I couldn't find a clean way to do the same as Let me know if this is acceptable to you. |
|
Not sure what you mean by "creative", but can we get rid of the |
That's exactly what I meant by "creative" 😅 PHPStan complains about "possibly unassigned/null variables" because it considers the case where the iterable is empty and the loop doesn't run; that's caught by the I've found in 8f2d548 a different approach to solve this, but I had to use a couple of Let me know if now it's ok for you. |
This adds a refactor to the
Mergerclass, allowing async merge of serialized coverage results (edit: by leveraging generators), for Paraunit (and similar tools) .This would help me with facile-it/paraunit#390:
array(list) to\Generator