Conversation
Replace jddayofweek() with a pure PHP array-based day name lookup to avoid dependency on the optional PHP calendar extension. This fixes dashboard crashes on Synology NAS, Alpine containers, and minimal PHP builds. Fixes #228
Add ?? 'Monday' null coalescing fallback to $dayNames[$startOfWeek] to prevent Undefined array key warning (PHP 8.0+) and DateMalformedStringException (PHP 8.3+) when start_of_week option is corrupted to a value outside 0-6 range. Refs #228
Move inline $dayNames array to private const DAY_NAMES to avoid re-allocation on every initSeqWeek() call. Refs #228
…lendar-extension Fix fatal error on servers without PHP calendar extension
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughVersion 5.4.3 release fixes a fatal error on servers without the PHP calendar extension by replacing jddayofweek()-based day lookup with an internal constant. Adds defensive fallback for corrupted start_of_week option. Updates all version metadata and changelog files accordingly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment Tip You can disable sequence diagrams in the walkthrough.Disable the |
Manual QA — ext-calendar simulationTested the fix against environments without ext-calendar to verify issue #228 is resolved. Environments
Results: 9/9 passed
MethodIsolated DataBuckets::initSeqWeek() with minimal WP stubs (get_option, wpdb), instantiated with WEEK granularity over a 28-day range, and verified bucket generation for all 7 start_of_week values plus an invalid edge case. Fix confirmed — ext-calendar dependency fully eliminated. |
E2E Test Results: Tracking Request Methods
✅ All 8 tests passed (2.0m)
What was verified
🤖 Generated with Claude Code | Spec: |
Release v5.4.3
Fixed
start_of_weekoption in calendar-related reportsImproved
Summary by CodeRabbit
Release 5.4.3