Skip to content

Enable symplify/phpstan-rules 14.17 rule sets and fix reported errors - #84

Merged
TomasVotruba merged 3 commits into
mainfrom
fix-phpstan-rules-14-17
Sep 28, 2026
Merged

TomasVotruba merged 3 commits into
mainfrom
fix-phpstan-rules-14-17

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

symplify/phpstan-rules 14.17.0 auto-loads all rule sets (naming, complexity, configurable, static, symfony, symfonyConfig, doctrine, phpunit). This keeps them all enabled and fixes the new errors:

  • SniffFileProcessor::fixFile() - use $this->fixer instead of passing the service as an argument
  • ECSConfig - set sniff properties via ReflectionProperty instead of a dynamic property name
  • TurboRunner - FileSystem::delete() instead of @unlink()
  • FileCacheStorage - drop @ on var_export(), errors are still caught via error_get_last()
  • ParametersMerger - truthy check instead of empty()
  • remove unused tests/functions.php dd() helper

Ignored in phpstan.neon by path:

  • File::__construct() skips the parent constructor on purpose - it requires a PHP_CodeSniffer Ruleset ECS does not use
  • static::class in AbstractSymplifyFixer::getName()
  • property_exists() in TurboConfigDumper
  • nullable StandaloneLineConstructorParamFixer in LineLengthFixer - hack to avoid running both rules together

@TomasVotruba TomasVotruba changed the title Keep symplify/phpstan-rules 14.17 auto-loaded rule sets disabled Enable symplify/phpstan-rules 14.17 rule sets and fix reported errors Sep 28, 2026
@TomasVotruba
TomasVotruba force-pushed the fix-phpstan-rules-14-17 branch from 44c7cec to 2972a73 Compare September 28, 2026 11:56
@TomasVotruba
TomasVotruba merged commit 142d119 into main Sep 28, 2026
9 checks passed
@TomasVotruba
TomasVotruba deleted the fix-phpstan-rules-14-17 branch September 28, 2026 11:59
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