Skip to content

Conversation

@tangrufus
Copy link
Member

No description provided.

@tangrufus tangrufus added the bug Something isn't working label Oct 25, 2025
@tangrufus tangrufus force-pushed the cache-read-str branch 2 times, most recently from 18a82c2 to 7c6928a Compare October 25, 2025 20:10
@codecov
Copy link

codecov bot commented Oct 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.50%. Comparing base (b915513) to head (4fc98f3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #12      +/-   ##
============================================
- Coverage     50.00%   49.50%   -0.50%     
+ Complexity       62       61       -1     
============================================
  Files             8        8              
  Lines           204      202       -2     
============================================
- Hits            102      100       -2     
  Misses          102      102              
Flag Coverage Δ
feature 22.27% <0.00%> (+0.21%) ⬆️
unit 27.22% <100.00%> (-0.72%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes Windows compatibility issues in the Cache class by replacing hardcoded Unix-style newlines (\n) with the platform-appropriate line separator constant (PHP_EOL). This ensures the cache content schema works correctly across different operating systems.

Key Changes

  • Replaced \n newlines with PHP_EOL constant in cache read/write operations
  • Simplified cache content parsing logic by using str_starts_with() instead of explode()
  • Updated test expectations to use PHP_EOL for consistency

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/WpOrg/Api/Cache.php Refactored cache read/write methods to use PHP_EOL and simplified parsing logic
tests/Unit/WpOrg/Api/CacheTest.php Updated test mocks to use PHP_EOL in expected cache content strings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tangrufus tangrufus merged commit fa2247e into main Oct 25, 2025
34 of 39 checks passed
@tangrufus tangrufus deleted the cache-read-str branch October 25, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

2 participants