Skip to content

IBX-12654: Added ibexa/phpstan and fixed dynamic calls to static methods - #53

Merged
konradoboza merged 4 commits into
6.0from
IBX-12654-added-ibexa-phpstan-and-fixed-dynamic-calls-to-static-methods
Sep 23, 2026
Merged

konradoboza merged 4 commits into
6.0from
IBX-12654-added-ibexa-phpstan-and-fixed-dynamic-calls-to-static-methods

Conversation

@bnowak

@bnowak bnowak commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-12654

Related PRs:

Description:

Adds ibexa/phpstan as a dev dependency and includes its extension in the PHPStan configuration.
Replaces dynamic calls to static methods ($this->assertX(), static test helpers, ...) with self::/ClassName:: calls: 2 calls in 2 files. The staticMethod.dynamicCall strict rule itself is enabled in the linked ibexa/phpstan PR; this PR keeps CI green once that is released.
No issues reported by ibexa/phpstan's existing rules, so no third commit was needed.

Also fixes a CI-only issue: ibexa/phpstan requires ibexa/doctrine-schema back (this package), so a detached PR-merge checkout could not derive a branch-based Composer root version, breaking resolution. Fixed by adding ibexa/gh-workflows/actions/setup-composer-root-version@main before every composer-install@main step in backend-ci.yaml (same fix already applied to ibexa/core, which has the identical self-reference).

Judgment call: ibexa/doctrine-schema does not require ibexa/core directly, so requiring ibexa/phpstan (which requires ibexa/core) failed Composer's minimum-stability check for the transitively-required ibexa/core dev version. Rather than loosening this package's stability settings, added "ibexa/core": "~6.0.x-dev" directly to require-dev, so Composer has an explicit dev-stability constraint to resolve against without needing minimum-stability/prefer-stable.

For QA:

No functional change. CI (PHPStan, code style, unit tests) is the verification.

Documentation:

No client-facing impact.

Comment thread composer.json Outdated
@sonarqubecloud

Copy link
Copy Markdown

@konradoboza
konradoboza merged commit 4086e09 into 6.0 Sep 23, 2026
10 checks passed
@konradoboza
konradoboza deleted the IBX-12654-added-ibexa-phpstan-and-fixed-dynamic-calls-to-static-methods branch September 23, 2026 12:48
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.

3 participants