fix(ci): scope PHPStan ignore for GitLab CI - #9
Conversation
|
Warning Review limit reached
More reviews will be available in 44 minutes and 3 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughSix deprecated procedural wrapper functions in ChangesPHP 8 Attribute Annotations
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@filefield_paths.module`:
- Around line 153-160: The deprecation message in the
filefield_paths_recommended_temporary_scheme() function incorrectly references
MoveFileProcessorInterface::recommendedFileScheme() as the replacement method,
but based on the actual delegation, it should reference
recommendedTemporaryScheme() instead. Update both the Deprecated attribute
message (starting with "in filefield_paths:8.x-1.0...") and the trigger_error
call in the function body to use the correct method name
recommendedTemporaryScheme() to ensure consumers are directed to the actual
replacement API.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 28bb208d-a938-47d1-b04c-1e2bc07bd3a0
📒 Files selected for processing (6)
filefield_paths.modulephpstan.neonsrc/Form/SettingsForm.phptests/modules/filefield_paths_test/src/StreamWrapper/FileFieldPathsDummyReadOnlyStreamWrapper.phptests/src/Functional/FileFieldPathsTestBase.phptests/src/Kernel/RedirectTest.php
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.x-1.x #9 +/- ##
========================================
Coverage 79.72% 79.72%
========================================
Files 17 17
Lines 666 666
========================================
Hits 531 531
Misses 135 135 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Also correct the deprecation message in filefield_paths_recommended_temporary_scheme() to reference MoveFileProcessorInterface::recommendedTemporaryScheme() (the actual delegate) instead of the non-existent recommendedFileScheme(). Found via CodeRabbit review.
11cc3c0 to
bf1bd0f
Compare
Problem
The
phpstanCI job on Drupal.org GitLab fails with 6Call to deprecated functionerrors inModuleDeprecatedWrappersTest.php. The pipeline shows green overall only because the job isallow_failure.Root cause
These deprecation calls are intentionally tested and are meant to be suppressed by an
ignoreErrorsblock inphpstan.neon. However the path was rooted:PHPStan reports paths relative to its working directory, which varies by invocation. On Drupal.org GitLab CI the module is analysed from its own root, so the path is reported as
tests/src/Kernel/...with noweb/modules/custom/...prefix — the rooted ignore never matched. (GitHub CI runs PHPStan frombuild/, so the rooted path happened to match here; the fix below works in both contexts.)Changes
phpstan.neon— use a leading wildcard so the ignore matches regardless of the working directory PHPStan is invoked from:Rector 2.5 attribute rules — Rector 2.5.1 (now resolved by CI) activates
AddOverrideAttributeToOverriddenMethodsRectorandDeprecatedAnnotationToDeprecatedAttributeRector, which fail thelintjob on the current8.x-1.xcode. Apply the automated fixes: add#[\Override]to overridden methods and convert@deprecateddocblocks to#[\Deprecated]attributes (existing@trigger_errorcalls retained). Generated withmake lint-fix.Testing
make lintpasses locally (PHPCS, PHPStan, Rector, Twig CS Fixer, ESLint, CSpell).feature/2072237-disable.8.x-1.xso it lands before the disable-feature PR, which already carries these fixes.Summary by CodeRabbit