PHPackages                             mavimo/phpstan-junit - 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. mavimo/phpstan-junit

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

mavimo/phpstan-junit
====================

PHPStan JUnit error reporter

0.3.0(6y ago)13322.2k↑214.3%117MITPHPPHP ~7.1

Since Mar 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mavimo/phpstan-junit)[ Packagist](https://packagist.org/packages/mavimo/phpstan-junit)[ RSS](/packages/mavimo-phpstan-junit/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (7)

PHPStan JUnit error reporter
============================

[](#phpstan-junit-error-reporter)

[![License](https://camo.githubusercontent.com/b8cfdff73068f2400b98a12a4b1f282bb6b3021376cd3dfb8730ca8f6e38b87e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6176696d6f2f7068707374616e2d6a756e69742e737667)](http://opensource.org/licenses/MIT)[![Coverage Status](https://camo.githubusercontent.com/13b718ebe74acf3f2ba8d5fb5fcf7286145069deaea540ca498ad60727addb2c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6d6176696d6f2f7068707374616e2d6a756e69742f6d61737465722e737667)](https://codecov.io/gh/mavimo/phpstan-junit?branch=master)[![Codacy Badge](https://camo.githubusercontent.com/62f6b6565d09ff934783942d39490a976557f9f8ef679a64c274571a5204b70d/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6365353236333236343065373433313362303338363238393065393939306663)](https://www.codacy.com/manual/mavimo/phpstan-junit)

[![Packagist](https://camo.githubusercontent.com/506323e014e27ed19a3681f4dc04427d199903f048222a756832c77e4e20ae32/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6176696d6f2f7068707374616e2d6a756e69742e737667)](https://packagist.org/packages/mavimo/phpstan-junit)[![Packagist](https://camo.githubusercontent.com/f5b0e20d19aaf4fcf596038d80b06315cda53dd294efe73c8ae6a8845c7a0622/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6176696d6f2f7068707374616e2d6a756e69742e737667)](https://packagist.org/packages/mavimo/phpstan-junit)[![Packagist](https://camo.githubusercontent.com/22a24ec2118f69982818de836704b1b2b53161da461152f6b8105b8fd4569216/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d6176696d6f2f7068707374616e2d6a756e69742e737667)](https://packagist.org/packages/mavimo/phpstan-junit)[![Packagist](https://camo.githubusercontent.com/2879034fe0faccf1505c07371d1f5b4a5039b9c54fb1fdb37c0539d0470a7751/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f6d6176696d6f2f7068707374616e2d6a756e69742e737667)](https://packagist.org/packages/mavimo/phpstan-junit)

The main scope for this project is to create error report in **JUnit** format that can be easly integrated in *Jenkins* or other tools that use this information.

DEPRECATION
-----------

[](#deprecation)

> **Warning**This project is not needed anymore since this feature is now built-in into PHPStan itself

How to use it
-------------

[](#how-to-use-it)

### Install

[](#install)

You need to include this library in your project as dev-dependency, it dependes on the version of phpstan you're using you should use a different version of `mavimo/phpstan-junit` library, this table will give you a dependency map:

`phpstan/phpstan` version`mavimo/phpstan-junit` version`0.10.x``0.1.x``0.11.x``0.2.x``0.12.x``0.3.x`But if alredy specified the `phpstan/phpstan` version you can just use:

```
composer require --dev mavimo/phpstan-junit
```

If you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set, otherwise take a look to *manual setup* section below.

 **Manual setup for PHPStan 0.11 and next** if you don't want to use `phpstan/extension-installer`, you should require the `extension.neon` file on your `phpstan.neon.dist` file in the root of your project (or on the file you specify to phpstan using the `--config` flag): ```
includes:
    - vendor/mavimo/phpstan-junit/extension.neon
```

or declaring the service via:

```
services:
    errorFormatter.junit:
        class: Mavimo\PHPStan\ErrorFormatter\JunitErrorFormatter
```

 **Manual setup for PHPStan 0.10**
 You should require this extension on `phpstan.neon` file in the root of your project or the file you specify to phpstan using the `--config` flag by referencing `extension.neon` file: ```
includes:
    - vendor/mavimo/phpstan-junit/phpstan.neon
```

or declaring the service via:

```
services:
    errorFormatter.junit:
        class: Mavimo\PHPStan\ErrorFormatter\JunitErrorFormatter
```

### Generate JUnit report

[](#generate-junit-report)

You should gnerate JUnit report with the flag `--error-format=junit`, eg:

```
vendor/bin/phpstan --error-format=junit --no-progress --no-interaction analyse src
```

Contributing
------------

[](#contributing)

Contributions are welcome!

PR's will be merged only if:

- *phpunit* is ✅, you can run it using `vendor/bin/phpunit`
- *phpstan* is ✅, you can run it using `vendor/bin/phpstan analyse`
- *phpcs* is ✅, you can run it using `vendor/bin/phpcs`
- *code coverage* will not decrease (or there are good reason to decrease it), you can check the current coverage using `phpdbg -qrr ./vendor/bin/phpunit --coverage-text`

If you have any question feel free to open a issue or contact me!

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.2% 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 ~53 days

Recently: every ~44 days

Total

6

Last Release

2401d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9e261c34d4dbf216fc68a5f353e75673d02f565600e1bb9cd0cefba6a3e3638?d=identicon)[mavimo](/maintainers/mavimo)

---

Top Contributors

[![mavimo](https://avatars.githubusercontent.com/u/43941?v=4)](https://github.com/mavimo "mavimo (69 commits)")[![mrjoops](https://avatars.githubusercontent.com/u/7291430?v=4)](https://github.com/mrjoops "mrjoops (9 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![henrikarrenbeld](https://avatars.githubusercontent.com/u/39762938?v=4)](https://github.com/henrikarrenbeld "henrikarrenbeld (1 commits)")[![mr-feek](https://avatars.githubusercontent.com/u/5747667?v=4)](https://github.com/mr-feek "mr-feek (1 commits)")

---

Tags

jenkinsjunitphpstanphpstan-extension

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mavimo-phpstan-junit/health.svg)

```
[![Health](https://phpackages.com/badges/mavimo-phpstan-junit/health.svg)](https://phpackages.com/packages/mavimo-phpstan-junit)
```

###  Alternatives

[larastan/larastan

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

6.5k55.4M8.4k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79475.7M2.2k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[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.

4853.5M91](/packages/shipmonk-dead-code-detector)[spaze/phpstan-disallowed-calls

PHPStan rules to detect disallowed method &amp; function calls, constant, namespace, attribute, property &amp; superglobal usages, with powerful rules to re-allow a call or a usage in places where it should be allowed.

33422.6M550](/packages/spaze-phpstan-disallowed-calls)[tomasvotruba/cognitive-complexity

PHPStan rules to measure cognitive complexity of your classes and methods

1635.6M288](/packages/tomasvotruba-cognitive-complexity)

PHPackages © 2026

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