IBX-12654: Added ibexa/phpstan and fixed dynamic calls to static methods - #74
Merged
wiewiurdp merged 3 commits intoSep 23, 2026
Conversation
|
bnowak
marked this pull request as ready for review
September 23, 2026 10:33
konradoboza
approved these changes
Sep 23, 2026
wiewiurdp
approved these changes
Sep 23, 2026
wiewiurdp
deleted the
IBX-12654-added-ibexa-phpstan-and-fixed-dynamic-calls-to-static-methods
branch
September 23, 2026 12:44
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:
Description:
Adds
ibexa/phpstanas a dev dependency and includes its extension in the PHPStan configuration.Replaces dynamic calls to static methods (
$this->assertX(), static test helpers, ...) withself::/ClassName::calls: 7 calls in 4 files. ThestaticMethod.dynamicCallstrict rule itself is enabled in the linked ibexa/phpstan PR; this PR keeps CI green once that is released.Also fixes what the existing
ibexa/phpstanrules report: 2 closures got precise return types (Ibexa.requireClosureReturnType) insrc/bundle/Form/DataTransformer/UsersTransformer.php.All 7 dynamic-call hits were
$this->createStub()calls in test files, which are not covered by thephp_unit_test_case_static_method_callsphp-cs-fixer rule (PHPUnit 11 static creator not yet handled by that rule); they were fixed with a targetedself::createStub(replacement.For QA:
No functional change. CI (PHPStan, code style, unit tests) is the verification.
Documentation:
No client-facing impact.