Skip to content

fix(logging): Remove deprecated array cast from Mongo request log model - #21

Merged
soulevilx merged 1 commit into
developfrom
fix/mongodb-context-cast
Jul 5, 2026
Merged

fix(logging): Remove deprecated array cast from Mongo request log model#21
soulevilx merged 1 commit into
developfrom
fix/mongodb-context-cast

Conversation

@soulevilx

@soulevilx soulevilx commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes the deprecated array cast on ClientRequestLog::$context required by mongodb/laravel-mongodb 5.8.x so PHPUnit no longer fails CI on deprecations.

Test plan

  • composer test

Summary by CodeRabbit

  • Bug Fixes
    • Adjusted how request log context data is handled so it’s no longer automatically converted on read or write.
    • Other logged values remain unchanged.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@github-actions github-actions Bot added the source label Jul 5, 2026
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 75aaef46-8de7-4043-a9fd-3b3df2a337ab

📥 Commits

Reviewing files that changed from the base of the PR and between 85d80d9 and 24d4329.

📒 Files selected for processing (1)
  • src/Models/Mongo/ClientRequestLog.php
💤 Files with no reviewable changes (1)
  • src/Models/Mongo/ClientRequestLog.php

📝 Walkthrough

Walkthrough

The $casts property in ClientRequestLog no longer casts the context field to an array. All other casts remain unchanged.

Changes

ClientRequestLog Cast Update

Layer / File(s) Summary
Remove context array cast
src/Models/Mongo/ClientRequestLog.php
The context entry is removed from the $casts map, so context is no longer auto-cast to an array.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has a summary and test plan, but it omits required sections like why, risk/rollback, docs impact, and checklist. Add the missing template sections: What changed, Why, How tested details, Documentation impact, Risk/rollback, and the checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: removing the deprecated array cast from the Mongo request log model.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mongodb-context-cast

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.

@soulevilx
soulevilx merged commit c82db3d into develop Jul 5, 2026
16 checks passed
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (85d80d9) to head (24d4329).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop      #21   +/-   ##
==========================================
  Coverage      99.72%   99.72%           
  Complexity       128      128           
==========================================
  Files             15       15           
  Lines            364      364           
==========================================
  Hits             363      363           
  Misses             1        1           
Flag Coverage Δ
unittests 99.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@soulevilx
soulevilx deleted the fix/mongodb-context-cast branch July 5, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants