Skip to content

Restore intentional @ forbiddenNode ignores, enable reportUnmatchedIgnoredErrors - #8569

Closed
TomasVotruba wants to merge 1 commit into
mainfrom
tv-restore-forbidden-node-ignores
Closed

TomasVotruba wants to merge 1 commit into
mainfrom
tv-restore-forbidden-node-ignores

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Problem

PHPStan currently reports 2 errors on main:

  • bin/rector.php:19 - @ini_set('memory_limit', '-1') (intentional, marked // @ intentionally)
  • src/Caching/ValueObject/Storage/FileCacheStorage.php:58 - @var_export(...) (native filesystem call, needed for performance)

Their symplify.forbiddenNode ignores were dropped in #8566 as if stale, but the @ usages are deliberate and still present, so the ignores are needed.

Changes

  • Restore the two symplify.forbiddenNode ignores for bin/rector.php and FileCacheStorage.php.
  • Enable reportUnmatchedIgnoredErrors (remove the false override, PHPStan default is true) so stale ignores are caught in CI going forward.
  • Drop the now-unmatched symplify.* ignores it surfaced (noConstructorOverride, noDynamicName, noReference, noNullableServiceInConstructor, commandHasAsCommandAttribute) - those rules no longer fire on the listed paths.

@TomasVotruba

Copy link
Copy Markdown
Member Author

Closing: this applied the stale-ignore cleanup and reportUnmatchedIgnoredErrors on a main base with the old symplify/phpstan-rules deps, where those ignores still match (and the restored forbiddenNode ignores do not), so PHPStan fails with 34 errors. This cleanup belongs on the deps-bump branch, where the new rules make the ignores genuinely stale.

@TomasVotruba
TomasVotruba deleted the tv-restore-forbidden-node-ignores branch October 9, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant