Skip to content

Report failures from setMultiple() - #112

Open
samdark wants to merge 2 commits into
fix-set-write-errorsfrom
fix-set-multiple-result
Open

samdark wants to merge 2 commits into
fix-set-write-errorsfrom
fix-set-multiple-result

Conversation

@samdark

@samdark samdark commented Oct 17, 2026

Copy link
Copy Markdown
Member
Q A
Is bugfix? Yes
New feature? No
Breaks BC? No
Fixed issues Extracted from #110

setMultiple() currently returns true even when an individual set() call fails. Return false if any write fails, while continuing to attempt every entry.

Stacked on #111 to keep each extracted fix in a separate review. This change does not require the atomic writes or new file format proposed in #110.

Copilot AI balanced review requested due to automatic review settings October 17, 2026 22:26
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2e65ead-a109-4d71-902a-799bd4a4db5f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The aggregation preserves every write attempt, and the regression test covers the reported failure scenario.

No open issues 🎉

What changed in this PR

Fixes FileCache::setMultiple() failure reporting, building on #111 without changing the cache file format.

Changes:

  • Returns false if any write fails while still attempting every entry.
  • Adds a regression test and changelog entry.
File Description
tests/​SetMultipleFailureTest.php Verifies failure reporting and continued writes.
src/​FileCache.php Aggregates individual write results.
CHANGELOG.md Documents the bug fix.

Review effort: Balanced

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.81%. Comparing base (b4b56fd) to head (d8df820).

Additional details and impacted files
@@                    Coverage Diff                     @@
##             fix-set-write-errors     #112      +/-   ##
==========================================================
+ Coverage                   92.77%   92.81%   +0.04%     
- Complexity                     69       70       +1     
==========================================================
  Files                           1        1              
  Lines                         166      167       +1     
==========================================================
+ Hits                          154      155       +1     
  Misses                         12       12              

☔ 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.

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.

2 participants