IBX-12654: Fixed dynamic calls to static methods - #2105
Merged
Merged
Conversation
bnowak
force-pushed
the
IBX-12654-fixed-dynamic-calls-to-static-methods
branch
from
September 23, 2026 08:45
6d45b17 to
7bbe4bc
Compare
|
bnowak
marked this pull request as ready for review
September 23, 2026 10:32
konradoboza
approved these changes
Sep 23, 2026
wiewiurdp
approved these changes
Sep 23, 2026
wiewiurdp
deleted the
IBX-12654-fixed-dynamic-calls-to-static-methods
branch
September 23, 2026 11:06
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:
Replaces dynamic calls to static methods (
$this->assertX(), static test helpers, ...) withself::/ClassName::calls: 57 calls in 11 files. ThestaticMethod.dynamicCallstrict rule itself is enabled in the linked ibexa/phpstan PR; this PR keeps CI green once that is released.51 of the 57 calls are
$this->assertSame()/$this->assertEquals()used insidewillReturnCallback()closures (php-cs-fixer'sphp_unit_test_case_static_method_callsrule does not rewrite calls inside closures, so these were fixed by hand); converting them toself::let php-cs-fixer'sstatic_lambdarule additionally mark 7 of those closures asstatic function, since they no longer capture$this. The remaining 6 calls are the package's own concrete static test helpers (createVersionInfo,createArgumentMetadata,createLocation,generateUser) called via$this->instead ofself::.Pre-existing, unrelated CI failure: the "MySQL integration tests" and "PostgreSQL integration tests" jobs fail with
Call to undefined method JMS\TranslationBundle\Translation\Comparison\ChangeSet::getChangedMessages()inTranslationTest::testTranslation. This is caused by ibexa/core (IBX-12594) bumpingibexa/jms-translation-bundleto the 3.0 fork whileadmin-uiitself still requires upstreamjms/translation-bundle ^2.4directly; both classes autoload under the same namespace. This diff does not touchcomposer.jsonor any translation-related code (see the file list above), so it is not the cause. All other checks (PHPStan, code style, rector, deptrac, browser tests, SonarCloud, base-branch check) are green.For QA:
No functional change. CI (PHPStan, code style, unit tests) is the verification.
Documentation:
No client-facing impact.