Skip to content

Fix: reportInfo="false" still reports issues that take info from a parent issue - #14785

Merged
alies-dev merged 1 commit into
vimeo:masterfrom
alies-dev:fix-report-info-parent-issue
Nov 24, 2026
Merged

alies-dev merged 1 commit into
vimeo:masterfrom
alies-dev:fix-report-info-parent-issue

Conversation

@alies-dev

Copy link
Copy Markdown
Collaborator

Context

<psalm reportInfo="false">
    <projectFiles>
        <file name="cart.php"/>
    </projectFiles>
    <issueHandlers>
        <InvalidOperand errorLevel="info"/>
    </issueHandlers>
</psalm>
// cart.php
function totalItems(?int $extra): int
{
    return 3 + $extra;
}

psalm --show-info=true reports INFO: PossiblyNullOperand. With reportInfo="false", the issue should not show up in the CLI output or in report files, and it should not count toward Shepherd's issue_counts.info.

Config::getReportingLevelForIssue() checked reportInfo too early: PossiblyNullOperand inherits info from InvalidOperand only after that check, so it was never suppressed. The same applies to any Possibly* issue whose parent is set to info.

Found on a production config with <InvalidOperand errorLevel="info"/>: 68 Possibly*Operand issues came through as info while every other info issue was dropped.

Solution

Psalm now checks reportInfo after resolving the issue's level, including the parent's, so PossiblyNullOperand is suppressed in this example. Issues that resolve to error or suppress are unchanged.

…nfo is off

A Possibly* issue that takes its level from its parent (for example
PossiblyNullOperand from <InvalidOperand errorLevel="info"/>) skipped
the reportInfo="false" check, so it was still reported as info.
@alies-dev alies-dev self-assigned this Nov 24, 2026
@alies-dev alies-dev added the release:fix The PR will be included in 'Fixes' section of the release notes label Nov 24, 2026
@alies-dev
alies-dev merged commit cf8d8c9 into vimeo:master Nov 24, 2026
73 of 74 checks passed
@alies-dev
alies-dev deleted the fix-report-info-parent-issue branch November 24, 2026 00:07
@github-actions

Copy link
Copy Markdown
Contributor

✅ Performance: unchanged · Types: unchanged

Project Memory (MB) Wall (s) Issues Weighted (types) Taint Dead code
✅ laravel 1 747 80.5 $\color{gray}{\textsf{+1.9\%}}$ 25 787 53 067 743 0
✅ symfony 3 619 276.0 $\color{gray}{\textsf{+0.3\%}}$ 51 739 100 455 1 582 0
✅ doctrine-orm 381 24.4 $\color{gray}{\textsf{+0.7\%}}$ 3 453 6 194 0 0
✅ psl 618 28.2 $\color{gray}{\textsf{+0.2\%}}$ 1 387 5 600 1 0
✅ phpunit 427 19.1 1 735 3 418 18 0
✅ php-parser 226 12.6 $\color{gray}{\textsf{-0.4\%}}$ 17 113 21 177 0 0
✅ tempest 887 36.2 $\color{gray}{\textsf{+2.0\%}}$ 5 091 10 536 275 0
✅ amphp-amp 48 1.2 $\color{gray}{\textsf{-2.4\%}}$ 29 49 0 0
✅ webmozarts-assert 274 3.5 $\color{gray}{\textsf{+0.3\%}}$ 575 2 714 0 0
✅ guzzle-promises 46 1.3 $\color{gray}{\textsf{+0.8\%}}$ 155 433 2 0
✅ monolog 134 4.5 $\color{gray}{\textsf{+1.4\%}}$ 918 2 491 11 0
✅ drupal 4 767 233.0 $\color{gray}{\textsf{-3.3\%}}$ 97 847 169 346 575 0
✅ wordpress 2 012 193.3 $\color{gray}{\textsf{+1.7\%}}$ 143 504 678 371 505 1
Total 15 186 913.8 $\color{gray}{\textsf{-0.1\%}}$ 349 333 1 053 851 3 712 1
How to read this table
  • Memory: Psalm's own peak figure, threads=1. More than +5 % fails, unless the PR changes composer.json.
  • Wall: base and head run on the same runner; ±10 % is noise. Above +10 % warns, never fails. re-run: a reversed second run was taken and the faster kept.
  • Issues: head count over all categories, then $\color{red}{\textsf{+added}}$ $\color{green}{\textsf{-removed}}$ against base.
  • Weighted (types): type issues weighted by error level (levels 1–8 as is, always-errors 10, strictness checks 1). Taint and dead-code issues are not weighed. The projects' own code is pinned and their dependencies resolve identically for base and head, so a change means Psalm reports more, fewer or differently serious issues. A rise is not necessarily a regression.
  • Taint: head count of Tainted* issues, then $\color{orange}{\textsf{+added}}$ $\color{orange}{\textsf{-removed}}$ against base. Both are orange as either direction needs review: more can be new detection or false positives, fewer can be fixed false positives or lost detection.
  • Dead code: head count of unused-code issues, shown only when a run reported some (findUnusedCode). More is red, fewer is green.
  • Total: sum over the projects compared on both sides. Its wall time warns above +5 % (±5 % is noise); the other thresholds apply per project.
  • Colors: $\color{red}{\textsf{red}}$ past a fail or warn threshold (or more issues), $\color{green}{\textsf{green}}$ an improvement past noise (or fewer issues), $\color{orange}{\textsf{orange}}$ needs review, $\color{gray}{\textsf{gray}}$ noise.
  • Performance: regressed if a head run crashed or timed out or a memory or wall delta is red, else improved if one is green, else unchanged. Its icon is the check result: ❌ fail · ⚠️ warn · ✅ pass; the icon next to each project is that project's result, 💥 = not comparable: base crashed or timed out (counts as ⚠️).
  • Types (heading): direction of the total weighted change, increased · decreased · unchanged. Taint and Dead code (heading): added and removed counts, present only when non-zero. Informational, never fails the check.

head c0f8573 · base d1e5743 (merge-base) · workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:fix The PR will be included in 'Fixes' section of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant