Skip to content

Remove obsolete wp_generate_attachment_metadata() PHPStan ignore entry - #258

Merged
swissspidy merged 1 commit into
mainfrom
fix/phpstan-unmatched-ignores
Aug 30, 2026
Merged

Remove obsolete wp_generate_attachment_metadata() PHPStan ignore entry#258
swissspidy merged 1 commit into
mainfrom
fix/phpstan-unmatched-ignores

Conversation

@swissspidy

@swissspidy swissspidy commented Aug 30, 2026

Copy link
Copy Markdown
Member

johnbillion/wp-compat 2.0.1 stopped reporting the $file parameter of wp_generate_attachment_metadata() as version-gated, fixing the false positive that the WPCompat.parameterNotAvailable.wpgenerateattachmentmetadata.file entry existed to suppress.

With nothing left to match, PHPStan now fails with a non-ignorable Ignored error pattern ... was not matched in reported errors, which is what broke the scheduled Code Quality run on main (run 33288245696). Removing the entry restores a clean analysis.


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Updated static analysis configuration by removing an outdated compatibility exception.
    • All other analysis rules remain unchanged.

johnbillion/wp-compat 2.0.1 no longer reports the `$file` parameter of
wp_generate_attachment_metadata() as version-gated, so the ignore entry
working around that false positive is now unmatched and fails the analysis.
Copilot AI lite review requested due to automatic review settings August 30, 2026 07:15
@swissspidy
swissspidy requested a review from a team as a code owner August 30, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added automated-pr scope:testing Related to testing labels Aug 30, 2026
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 39908e64-0ea7-4f9f-9b6c-a53ee3856a5f

📥 Commits

Reviewing files that changed from the base of the PR and between 8ef2bf4 and d51e7d3.

📒 Files selected for processing (1)
  • phpstan.neon.dist
💤 Files with no reviewable changes (1)
  • phpstan.neon.dist

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PHPStan configuration removes the ignore rule for WPCompat.parameterNotAvailable.wpgenerateattachmentmetadata.file and its related comment. Other ignore rules remain unchanged.

Changes

Cohort / File(s) Summary
PHPStan configuration
phpstan.neon.dist
Removes the WordPress compatibility ignore rule and its explanatory comment.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to d51e7

This change removes an obsolete PHPStan ignore entry so static analysis can complete successfully; it is a localized configuration cleanup with no actionable merge-blocking risk remaining.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing the obsolete PHPStan ignore entry for wp_generate_attachment_metadata().
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/phpstan-unmatched-ignores

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy added this to the 3.0.1 milestone Aug 30, 2026
@swissspidy
swissspidy merged commit f8d3fe6 into main Aug 30, 2026
57 checks passed
@swissspidy
swissspidy deleted the fix/phpstan-unmatched-ignores branch August 30, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants