Updated PHPStan config to ignore array types for hooks '@return' params.#2453
Updated PHPStan config to ignore array types for hooks '@return' params.#2453AlexSkrypnyk merged 1 commit intomainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (15)
📒 Files selected for processing (1)
WalkthroughRefines PHPStan Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This comment has been minimized.
This comment has been minimized.
2d901dc to
b58b3d1
Compare
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2453 +/- ##
==========================================
- Coverage 79.88% 79.42% -0.47%
==========================================
Files 128 121 -7
Lines 6861 6702 -159
Branches 47 3 -44
==========================================
- Hits 5481 5323 -158
+ Misses 1380 1379 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Updated the PHPStan
ignoreErrorsconfiguration inphpstan.neonand all installer test fixture variants to broaden the hook implementations rule. The previous pattern#.* with no value type specified in iterable type array#was too narrow and missed cases where the error message uses@returnannotation wording; it has been replaced with a unified#.*no value type specified in iterable type array#pattern (without the leadingwith) that covers both parameter and return-value contexts. The entries were also reordered so the broader hook and settings ignores appear before the test-specific one, andreportUnmatched: falsewas removed from the hooks rule since matches are now guaranteed.Changes
phpstan.neon— Replaced the two separateignoreErrorsentries for hook implementations and settings includes with consolidated, reordered entries; updated the hook rule pattern to match both parameter and return-value array-type errors._baseline,hosting_acquia,hosting_project_name___acquia,theme_claro,theme_olivero,theme_stark,tools_groups_no_fe_lint_no_theme,tools_groups_no_fe_lint_no_theme_circleci,tools_no_eslint_no_theme,tools_no_stylelint_no_theme) — Applied the same pattern and ordering changes; Acquia-hosted fixtures also updated paths fromweb/todocroot/.tools_groups_no_be_tests,tools_groups_no_be_tests_circleci,tools_no_phpunit,tools_no_phpunit_circleci— Updated diff line references to match the new line numbers after the reordering.tools_groups_no_fe_lint_no_theme— Removed a stale empty test fileweb/modules/custom/sw_demo/js/-sw_demo.test.js.Summary by CodeRabbit