Search by

bafs / psalm-plugin-typecov

BafS

Get nice type coverage reports

Package info

github.com/BafS/psalm-typecov

Type:psalm-plugin

pkg:composer/bafs/psalm-plugin-typecov

Statistics

Installs: 1 778

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

v1.1.0 2026-10-06 13:19 UTC

This package is auto-updated.

Last update: 2026-10-06 13:20:07 UTC


README

Experimental Psalm plugin to have type coverage information

Install

composer req --dev bafs/psalm-plugin-typecov

Register the plugin in psalm.xml:

    <plugins>
        <pluginClass class="BafS\PsalmTypecov\TypeCoverage">
            <htmlReport output="typecov-report.html" />
        </pluginClass>
    </plugins>

Use markdownReport instead of (or together with) htmlReport to get a Markdown table, handy for pull request comments or a GitHub Actions job summary:

            <markdownReport output="typecov-report.md" />

You can run psalm (typically ./vendor/bin/psalm) and the report will get generated on the fly.

Minimum coverage per file

Add minFileCoverage to list the files whose type coverage is below a percentage and to make Psalm exit with code 2 (the code it uses for errors), for example in CI:

        <pluginClass class="BafS\PsalmTypecov\TypeCoverage">
            <minFileCoverage value="80" />
        </pluginClass>

It can be combined with a report or used alone.

Note: If you want to always scan all the files, you need to use the --no-cache flag.

Screenshoot