Skip to content

Conversation

@premtsd-code
Copy link
Contributor

@premtsd-code premtsd-code commented Feb 11, 2026

Summary

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved database result handling to ensure consistent and proper data conversion when processing query results.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

The MongoDB adapter's find method was modified to recursively convert stdClass objects to arrays before wrapping cursor results in Document objects. This change applies the convertStdClassToArray conversion function to each record retrieved from additional getMore operations.

Changes

Cohort / File(s) Summary
MongoDB Cursor Result Handling
src/Database/Adapter/Mongo.php
Modified find method to convert stdClass objects within records to arrays via convertStdClassToArray before creating Document instances from getMore cursor results.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A tiny hop through MongoDB's path,
Converting classes with gentle wrath,
stdClass becomes an array so fair,
Documents bloom with recursive care! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: converting stdClass to array in the find() method's getMore loop, matching the core fix in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/mongo-stdclass-to-array

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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