felconca/phpstan-ui

A local browser UI for PHPStan analysis results — no PHPStan Pro needed.

Maintainers

Package info

github.com/felconca/phpstanUI

Language:HTML

Type:phpstan-extension

pkg:composer/felconca/phpstan-ui

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.01 2026-05-08 06:26 UTC

This package is auto-updated.

Last update: 2026-05-08 06:29:00 UTC


README

A local browser UI for PHPStan analysis results. No PHPStan Pro needed.

Installation

composer require --dev felconca/phpstan-ui

Or for local development, add to your project's composer.json:

{
  "repositories": [
    {
      "type": "path",
      "url": "../phpstan-ui"
    }
  ],
  "require-dev": {
    "felconca/phpstan-ui": "*"
  }
}

Usage

Run PHPStan with the ui error formatter:

vendor/bin/phpstan analyse src/ --error-format=ui
vendor/bin/phpstan analyse src/ --error-format=ui --level=5
vendor/bin/phpstan analyse src/MyFile.php --error-format=ui

PHPStan runs as normal, then a local PHP server starts at http://localhost:8742 and your browser opens automatically.

Press Ctrl+C in the terminal to stop the server when you're done.

Features

  • File tree sidebar with error counts
  • Search across files and error messages
  • Filter: All / Errors only / Ignorable only
  • Sort: by error count or filename
  • Expandable file blocks with line numbers
  • Identifier tags, tip blocks, ignorable badges
  • Zero-dependency — uses PHP built-in server
  • Works on Windows, macOS, and Linux

Custom Port

To change the default port (8742), override the service in your phpstan.neon:

services:
    -
        class: PhpstanUi\UiErrorFormatter
        arguments:
            port: 9000
            host: localhost
        tags:
            - phpstan.errorFormatter

Requirements

  • PHP >= 5.6
  • PHPStan ^1.0
  • Composer