IBX-12654: Enabled the PHPStan strict rule for dynamic calls to static methods - #16
Merged
bnowak merged 1 commit intoSep 23, 2026
Conversation
This was referenced Sep 22, 2026
Merged
Merged
Merged
Merged
Merged
Merged
Merged
Merged
bnowak
marked this pull request as ready for review
September 23, 2026 10:33
bnowak
force-pushed
the
IBX-12654-enabled-PHPStan-strict-rule-for-dynamic-calls-to-static-methods
branch
from
September 23, 2026 13:03
683b716 to
b0cebf4
Compare
Steveb-p
approved these changes
Sep 23, 2026
alongosz
approved these changes
Sep 23, 2026
bnowak
deleted the
IBX-12654-enabled-PHPStan-strict-rule-for-dynamic-calls-to-static-methods
branch
September 23, 2026 13:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related PRs (63 consumer PRs, must merge before this one):
Not included:
ibexa/activity-logalready ships the fullphpstan-strict-rulesset (this rule was already active there with 0 hits, no PR needed).ibexa/jms-translation-bundleis blocked on a separate Symfony 7.4/8.0 dependency conflict and needs a decision before it can be adjusted.Description:
Enables the
phpstan/phpstan-strict-rulescheck for dynamic calls to static methods (staticMethod.dynamicCall) in the shared Ibexa ruleset by registeringPHPStan\Rules\StrictCalls\DynamicCallOnStaticMethodsRuleandPHPStan\Rules\StrictCalls\DynamicCallOnStaticMethodsCallableRuleunderrules:inextension.neon.Because the rule classes now ship as part of the extension,
phpstan/phpstan-strict-rulesmoves fromrequire-devtorequire, so every consumer ofibexa/phpstangets them installed.The consumer packages are fixed first (their PRs replace
$this->assertX()-style calls and static test helpers withself::/ClassName::calls); this PR merges last, once those are in, so their CI stays green when this rule is released. The package's own PHPStan run, test suite and code style check pass with the change, and the rule was verified to reportDynamic call to static method Foo::bar().when analysing a throwaway fixture throughextension.neon.For QA:
No functional change. CI (PHPStan, code style, unit tests) is the verification.
Documentation:
No client-facing impact.