Skip to content

chore: fix PHPStan failures for PHP 8.4 and unmatched ignores - #9581

Open
sofisl wants to merge 1 commit into
mainfrom
chore/phpstan-fixes
Open

chore: fix PHPStan failures for PHP 8.4 and unmatched ignores#9581
sofisl wants to merge 1 commit into
mainfrom
chore/phpstan-fixes

Conversation

@sofisl

@sofisl sofisl commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This PR fixes recent PHPStan CI failures related to PHP 8.4 property hooks and unmatched ignores.

The gapic-generator-php has started generating protected properties, which causes PHPStan to fail with unset.possiblyHookedProperty since PHP 8.4 added property hooks. Also, as obsolete files are being cleaned up across the repository, the array.duplicateKey ignore rule is occasionally left unmatched, causing the CI to fail.

We can fix this by:

  1. Adding unset.possiblyHookedProperty to phpstan.neon.dist ignoreErrors.
  2. Adding reportUnmatchedIgnoredErrors: false to phpstan.neon.dist.

This was originally included in #9555 but split into a separate PR to keep changes isolated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant