PHPackages                             shipmonk/phpstan-baseline-per-identifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. shipmonk/phpstan-baseline-per-identifier

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

shipmonk/phpstan-baseline-per-identifier
========================================

Split your PHPStan baseline into multiple files, one per error identifier. Supports both neon baseline and PHP baseline.

2.3.0(5mo ago)931.1M↓13.5%5[1 issues](https://github.com/shipmonk-rnd/phpstan-baseline-per-identifier/issues)18MITPHPPHP ^7.4 || ^8.0CI passing

Since Oct 3Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/shipmonk-rnd/phpstan-baseline-per-identifier)[ Packagist](https://packagist.org/packages/shipmonk/phpstan-baseline-per-identifier)[ RSS](/packages/shipmonk-phpstan-baseline-per-identifier/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (14)Used By (18)

PHPStan baseline per error identifier
=====================================

[](#phpstan-baseline-per-error-identifier)

Split your [PHPStan baseline](https://phpstan.org/user-guide/baseline) into multiple files, one per error identifier:

```
baselines/
 ├─ _loader.neon
 ├─ empty.notAllowed.neon
 ├─ foreach.nonIterable.neon
 ├─ identical.alwaysFalse.neon
 └─ if.condNotBoolean.neon
```

Each file looks like this:

```
# total 1 error

parameters:
    ignoreErrors:
        -
            message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
            path: ../app/index.php
            count: 1
```

Installation:
-------------

[](#installation)

```
composer require --dev shipmonk/phpstan-baseline-per-identifier
```

Usage
-----

[](#usage)

Important

*This usage is available since version 2.0. See legacy usage below if you are still using PHPStan 1.x*

Remove old single baseline include:

```
-includes:
-	- phpstan-baseline.neon
```

Run native baseline generation and split it into multiple files via our script (other baseline files will be placed beside the loader):

```
vendor/bin/phpstan --generate-baseline=baselines/_loader.neon && vendor/bin/split-phpstan-baseline baselines/_loader.neon
```

Setup the baselines loader:

```
# phpstan.neon.dist
includes:
    - baselines/_loader.neon
```

*(optional)* You can simplify generation with e.g. composer script:

```
{
    "scripts": {
        "generate:baseline:phpstan": [
            "phpstan --generate-baseline=baselines/_loader.neon",
            "split-phpstan-baseline baselines/_loader.neon"
        ]
    }
}
```

### Legacy usage

[](#legacy-usage)

> *This usage is deprecated since 2.0, but it works in all versions. Downside is that it cannot utilize result cache and does not support `rawMessage`.*

Setup where your baseline files should be stored and include its loader:

```
# phpstan.neon.dist
includes:
    - vendor/shipmonk/phpstan-baseline-per-identifier/extension.neon # or use extension-installer
    - baselines/loader.neon

parameters:
    shipmonkBaselinePerIdentifier:
        directory: %currentWorkingDirectory%/baselines
        indent: '    '
```

Prepare composer script to simplify generation:

```
{
    "scripts": {
        "generate:baseline:phpstan": [
            "rm baselines/*.neon",
            "touch baselines/loader.neon",
            "phpstan analyse --error-format baselinePerIdentifier"
        ]
    }
}
```

Cli options
-----------

[](#cli-options)

- `--tabs` to use tabs as indents in generated neon files
- `--no-error-count` to remove errors count in generated files

PHP Baseline
------------

[](#php-baseline)

- If the loader file extension is php, the generated files will be php files as well

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance76

Regular maintenance activity

Popularity54

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Recently: every ~74 days

Total

11

Last Release

161d ago

Major Versions

1.0.0 → 2.0.02024-11-22

PHP version history (2 changes)1.0.0PHP ^8.0

2.1.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b545e3f9d982d538f11bc42b3dc2d186f706cef92c8bc8bc8f8788b08186ea5?d=identicon)[janedbal](/maintainers/janedbal)

![](https://www.gravatar.com/avatar/7a4170ebe9281cb76be91fe00f8eee307beb3e0744dfd40ba89d9c856372c7eb?d=identicon)[shipmonk](/maintainers/shipmonk)

---

Top Contributors

[![janedbal](https://avatars.githubusercontent.com/u/1993453?v=4)](https://github.com/janedbal "janedbal (27 commits)")[![JanTvrdik](https://avatars.githubusercontent.com/u/175109?v=4)](https://github.com/JanTvrdik "JanTvrdik (6 commits)")[![gharlan](https://avatars.githubusercontent.com/u/330436?v=4)](https://github.com/gharlan "gharlan (6 commits)")[![Ph0tonic](https://avatars.githubusercontent.com/u/5320541?v=4)](https://github.com/Ph0tonic "Ph0tonic (2 commits)")[![maxime-vf](https://avatars.githubusercontent.com/u/81414965?v=4)](https://github.com/maxime-vf "maxime-vf (1 commits)")[![simbig](https://avatars.githubusercontent.com/u/26680884?v=4)](https://github.com/simbig "simbig (1 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (1 commits)")

---

Tags

baselineerroridentifierphpstanPHPStandevphpstan-extensionphpstan baselineerror identifier

###  Code Quality

TestsPHPUnit

Type Coverage Yes

### Embed Badge

![Health badge](/badges/shipmonk-phpstan-baseline-per-identifier/health.svg)

```
[![Health](https://phpackages.com/badges/shipmonk-phpstan-baseline-per-identifier/health.svg)](https://phpackages.com/packages/shipmonk-phpstan-baseline-per-identifier)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[staabm/phpstan-dba

2912.3M2](/packages/staabm-phpstan-dba)[staabm/phpstan-todo-by

1991.8M55](/packages/staabm-phpstan-todo-by)[ekino/phpstan-banned-code

Detected banned code using PHPStan

2925.6M92](/packages/ekino-phpstan-banned-code)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

3462.2M52](/packages/shipmonk-dead-code-detector)[tomasvotruba/bladestan

PHPStan rule for static analysis of Blade templates

363584.5k4](/packages/tomasvotruba-bladestan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
