nicksdot/phpstan-phpstorm-error-identifiers

Custom PHPStan formatter to show error identifiers in PhpStorm inspection output.

Installs: 100 588

Dependents: 3

Suggesters: 0

Security: 0

Stars: 5

Watchers: 2

Forks: 1

Open Issues: 0

pkg:composer/nicksdot/phpstan-phpstorm-error-identifiers

0.3.0 2026-01-25 04:48 UTC

This package is auto-updated.

Last update: 2026-01-25 05:26:35 UTC


README

Installation

  1. Run composer require nicksdot/phpstan-phpstorm-error-identifiers
  2. Then add the formatter(s) you want to the services section in your phpstan.neon

PHPStan error identifiers in PhpStorm inspection output

Usage

  1. Add the service to phpstan.neon:
services:
	errorFormatter.checkstyle:
		class:  NickSdot\PhpStanPhpStormErrorIdentifiers\CheckstyleErrorFormatterPhpStorm

That's it, PHPStorm will automatically use it. And here is how it looks like:

PHPStan error identifiers in PhpStorm inspection output

LLM Error Formatter

The output of the PHPStan LLM error formatter is optimised for LLMs, resulting in 40–60% less token usage compared to the default RawErrorFormatter output.

Real-life Example (210 errors):

Formatter Token Characters
TableErrorFormatter 11,693 132,882
RawErrorFormatter 9,265 35,794
LlmErrorFormatter 4,316 18,245

Usage

  1. Add the service to phpstan.neon:
services:
	errorFormatter.llm:
		class: NickSdot\PhpStanPhpStormErrorIdentifiers\LlmErrorFormatter
  1. Run PHPStan with the --error-format=llm flag.