Repository navigation
Ignore platform requirements in Qodana bootstrap - #644
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates Qodana's Composer bootstrap to ignore platform requirements because the linter container lacks ext-bcmath, while leaving real platform compatibility checks to CI. Sequence diagram for Qodana Composer bootstrap and CI platform checkssequenceDiagram
participant Qodana
participant Composer
participant CI
Qodana->>Composer: config platform.php 8.4
Qodana->>Composer: install --no-interaction --prefer-dist --ignore-platform-reqs
Composer-->>Qodana: Vendor code installed for type information
CI->>Composer: check-platform-reqs
Composer-->>CI: Report real platform compatibility
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
🟡 Changes recommended
The broad bypass can resolve dependencies incompatible with the configured PHP 8.4 target; only ext-bcmath should be ignored.
1 open finding
What changed in this PR
Updates Qodana bootstrap to install dependencies despite the linter image lacking ext-bcmath.
Changes:
- Adds platform-requirement bypassing to Composer installation.
| File | Description |
|---|---|
qodana.yaml |
Adjusts Qodana dependency installation flags. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="qodana.yaml" line_range="11" />
<code_context>
version: "8.4"
-bootstrap: cp composer.json.dist composer.json && composer config platform.php 8.4 && composer install --no-interaction --prefer-dist
+bootstrap: cp composer.json.dist composer.json && composer config platform.php 8.4 && composer install --no-interaction --prefer-dist --ignore-platform-reqs
exclude:
</code_context>
<issue_to_address>
**Qodana scan fails on newer PHP dependencies**
When a dependency allowed by the declared constraints requires PHP newer than 8.4, composer ignores the PHP platform requirement and can install that dependency; Qodana then cannot analyze the vendor code with PHP 8.4, so the scan fails.
Remove `--ignore-platform-reqs` so Composer enforces the configured PHP 8.4 platform requirement.
Also at `qodana.yaml:12`.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: qodana.yaml:11
|
Narrowed in 6a77713 to |
|
|




Qodana's
bootstraprunscomposer installinside the JetBrains linter container, which has noext-bcmath.moneyphp/moneyrequires it, so the install fails and the scan exits with code 2. This has happened on master since the scan started running for real (#643).Qodana only reads vendor code for type information and never runs it, so
--ignore-platform-reqsis safe here. The real platform check is stillcomposer check-platform-reqsinci.yml.Summary by Sourcery
Bug Fixes:
Summary by CodeRabbit