Repository navigation
Fix PHPStan 2.3 varTag error; group Dependabot Actions bumps - #1042
Conversation
PHPStan 2.3.1 (Dependabot #1037) rejects the `@var LitMassVariousNeeds[]` cast in LiturgicalEvent's constructor: it infers the array may still hold LitCommon. It was right. The coherence check compared gettype(), which calls every enum case 'object', so a LitCommon mixed into a LitMassVariousNeeds array passed. Compare get_debug_type() instead, and replace the cast with an instanceof filter the type checker can follow. Group minor and patch github-actions bumps into one Dependabot PR. When several PRs edit the same workflow file, merging the first leaves the rest needing a combined workflow file that the auto-merge GITHUB_TOKEN may not write, so GitHub disables their auto-merge (#1038, #1039). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fi2M7bQg1ZV2rDt9jwwfyW
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Common array handling src/Models/Calendar/LiturgicalEvent.php, phpunit_tests/Models/Calendar/LiturgicalEventConstructorCommonTest.php |
The constructor uses get_debug_type() to identify mixed array element types. It filters LitMassVariousNeeds cases and reindexes the result. Tests check preservation of those cases and rejection of arrays mixed with LitCommon. |
Dependabot update grouping
| Layer / File(s) | Summary |
|---|---|
GitHub Actions update group .github/dependabot.yml |
Dependabot groups minor and patch GitHub Actions updates. Major updates remain separate. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Merge Risk: 
Minimal · up to 78143
-
The constructor change and Dependabot grouping have no identified merge-blocking issue; proceed with normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title names two changes: a PHPStan 2.3 varTag error fix in LiturgicalEvent, and grouping of Dependabot GitHub Actions bumps. Both appear in the changeset: the constructor type check moved to get_debug_type() with an instanceof filter, and dependabot.yml now groups minor and patch updates. The title is specific and short, and it mentions the two main changes. It does not mention the new PHPUnit test class, which is a minor part of the change set.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- 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.
Comment @coderabbitai help to get the list of available commands.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Pull Request
Description
This PR clears what stopped three Dependabot PRs from auto-merging.
PHPStan 2.3.1 error (blocks #1037). PHPStan 2.3.1 reports
varTag.nativeTypeatsrc/Models/Calendar/LiturgicalEvent.php:146. The@var LitMassVariousNeeds[]cast there is wrong. The constructor's coherence check comparedgettype(), which reports every enum case as'object', so aLitCommonmixed into aLitMassVariousNeedsarray passed the check and was stored as-is.get_debug_type(), the class names, so a mixed array throwsInvalidArgumentException.instanceoffilter that PHPStan can follow. It keeps every element of an array that passed the check.Auto-merge turned off on #1038 and #1039. Both edit
.github/workflows/main.yml, as #1036 did. Once #1036 merged, merging either one meant writing a combined workflow file. TheGITHUB_TOKENused by auto-merge can't have theworkflowspermission, so GitHub turned their auto-merge off (auto_merge_disabledin the timelines, shortly after their checks passed).dependabot.ymlnow groups minor and patchgithub-actionsbumps into one PR; major bumps still get one PR each.After this merges,
·@·d·ependabot r·ebaseon #1037 lets its still-enabled auto-merge complete. #1038 and #1039 need a manual merge, or a rebase one at a time.Type of change
How Has This Been Tested?
No errorswith it.No errors.phpcsandparallel-linton the changed PHP files: clean.phpunit_tests/Models/Calendar/LiturgicalEventConstructorCommonTest.php(an array of onlyLitMassVariousNeedsis kept as given; a mixed array is rejected). Not run locally: the environment had PHP 8.3, which can't parse the project's 8.4 syntax. CI will be the first run.Checklist
Generated by Claude Code
Summary by CodeRabbit
Bug Fixes
Chores