Skip to content

UX: List enabled plugins in the startup output - #14510

Merged
alies-dev merged 9 commits into
vimeo:masterfrom
alies-dev:alies-dev/output-plugins
Nov 21, 2026
Merged

alies-dev merged 9 commits into
vimeo:masterfrom
alies-dev:alies-dev/output-plugins

Conversation

@alies-dev

@alies-dev alies-dev commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Psalm's startup output does not say which plugins are enabled, and preloading, which takes under a second, prints a 32-row progress bar.

Before (./psalm on Psalm itself)

Running on PHP 8.5.12, Psalm dev-master@c91f306.

Preloading in progress...

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░   60 / 1928 (3%)
… 31 more rows …
░░░░░░░░░Preloading took 0.4 seconds.

Target PHP version: 8.2 (inferred from composer.json). Enabled extensions: dom, simplexml, zstd.


Scanning files...

After

Running on PHP 8.5.12, Psalm dev-master@c91f306.

Preloading took 0.3 seconds.

Target PHP version: 8.2 (inferred from composer.json)
Enabled extensions: dom, simplexml, zstd
Enabled plugins: psalm/phpunit, psalm/mockery, webmozart/assert, examples/plugins/FunctionCasingChecker.php, examples/plugins/InternalChecker.php

Scanning files...

When a Composer package declares the plugin class (extra.psalm.pluginClass), the list shows the package name without plugin-, psalm-, -plugin or -psalm in the part after the slash: psalm/plugin-laravel appears as psalm/laravel. Psalm looks the package up in the project's vendor/composer/installed.json and in the one of its own installation, so the plugins it bundles keep their package names when Psalm runs as a phar or from a global install. The list includes the plugins Psalm enables because the project's composer.json requires a supported library. Other plugin classes appear by short class name (by full name if that is just Plugin), and file plugins by path. When there are unsupported extensions, they get their own Unsupported extensions: line.

Preloader no longer reports one task per class, so LongProgress does not draw a ~1900-tick bar. The preloading and JIT phases now print only their duration.
Print each startup item (PHP version, extensions, plugins) on its own line. A plugin is shown as the Composer package declaring it, without the plugin/psalm affixes (psalm/plugin-phpunit is psalm/phpunit).
@alies-dev alies-dev added the release:feature The PR will be included in 'Features' section of the release notes label Nov 21, 2026
@alies-dev alies-dev self-assigned this Nov 21, 2026
…tupMessage

The method also lists the enabled extensions and plugins.
@alies-dev
alies-dev marked this pull request as ready for review November 21, 2026 15:07
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Performance: unchanged · Types: unchanged

Project Memory (MB) Wall (s) Issues Weighted (types) Taint
✅ laravel 1 751 66.3 $\color{gray}{\textsf{-0.6\%}}$ 25 908 53 462 682
✅ symfony 3 600 265.6 $\color{gray}{\textsf{+0.4\%}}$ 50 611 98 405 1 528
✅ doctrine-orm 381 20.1 $\color{gray}{\textsf{-0.4\%}}$ 3 481 6 143 0
✅ psl 617 25.2 $\color{gray}{\textsf{+0.4\%}}$ 1 375 5 615 1
✅ phpunit 455 18.1 $\color{gray}{\textsf{-0.1\%}}$ 1 731 3 410 18
✅ php-parser 226 11.9 $\color{gray}{\textsf{-0.8\%}}$ 17 132 21 025 0
✅ tempest 895 34.2 $\color{gray}{\textsf{-0.2\%}}$ 5 047 10 528 252
✅ amphp-amp 68 1.9 $\color{gray}{\textsf{-1.1\%}}$ 29 49 0
✅ webmozarts-assert 273 $\color{gray}{\textsf{+0.1\%}}$ 4.7 577 2 720 0
✅ guzzle-promises 44 1.6 $\color{gray}{\textsf{-1.3\%}}$ 155 434 2
✅ monolog 135 5.6 $\color{gray}{\textsf{-0.4\%}}$ 913 2 479 10
✅ drupal 4 841 188.0 $\color{gray}{\textsf{-0.3\%}}$ 97 591 169 293 583
Total 13 285 643.0 204 550 373 563 3 076
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 +20 % 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. Thresholds apply per project, not to the total.
  • 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 e480d73 · base c5f4dfd (merge-base) · workflow run

@alies-dev alies-dev changed the title List enabled plugins in the startup output and drop the preloading progress bar UX: List enabled plugins in the startup output Nov 21, 2026
A project that does not have Psalm in its own vendor directory (phar, global install) got the full class names of the auto-enabled plugins. The plugin packages are now also read from the installed.json of Psalm's own installation, the project's packages winning.
Plugins were deduplicated by their printed name, which merged different classes sharing a short name and kept one file spelled two ways. A class is now identified by its lowercase name, a file by its canonical path.
Strip the plugin/psalm affixes with one regex, read the plugin class of a package like getLibraryPluginClasses() does, return early from LongProgress::startPhase() for the phases that print only a duration, and describe the rules where they live.
realpath() results were compared loosely; Psalm's self-analysis flags that.
@alies-dev
alies-dev merged commit 3a3fdf6 into vimeo:master Nov 21, 2026
70 checks passed
@alies-dev
alies-dev deleted the alies-dev/output-plugins branch November 21, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:feature The PR will be included in 'Features' section of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant