Skip to content

chore: upgrade to PHPStan 2 - #44

Merged
shyim merged 1 commit into
FriendsOfShopware:mainfrom
stefanpoensgen:chore/phpstan-2
Sep 3, 2026
Merged

shyim merged 1 commit into
FriendsOfShopware:mainfrom
stefanpoensgen:chore/phpstan-2

Conversation

@stefanpoensgen

Copy link
Copy Markdown
Member

The phpstan job on main currently fails with

Call to method booleanNode() on an unknown class Symfony\Component\Config\Definition\Builder\NodeBuilder<...>

because PHPStan 1.x cannot resolve the generics that current symfony/config declares. This upgrades to PHPStan 2 and resolves the three findings it reports at level max:

  • FlowEventException: nullsafe access on the left side of ??
  • FlowLogSubscriber: getThrowable() result is mixed, narrow to Throwable|null; drop an ignore that no longer matches an error
  • treatPhpDocTypesAsCertain: false, so the runtime is_string() guard on getPrimaryKey() (array|string) stays

https://claude.ai/code/session_01G2xLjqD8vZ7Ys3inHx4ax5

PHPStan 1.x fails on the NodeBuilder generics of current symfony/config,
which keeps the CI red on main.

Claude-Session: https://claude.ai/code/session_01G2xLjqD8vZ7Ys3inHx4ax5
@shyim
shyim merged commit dea17ea into FriendsOfShopware:main Sep 3, 2026
2 checks passed
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.

2 participants