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

ActiveLibrary[Testing &amp; Quality](/categories/testing)

samcday/phpstan-junit
=====================

PHPStan JUnit error reporter

0.2.0(6y ago)037MITPHPPHP ~7.1

Since Mar 16Pushed 6y agoCompare

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

READMEChangelogDependencies (3)Versions (3)Used By (0)

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)

[![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.

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.

#### PHPStan 0.10

[](#phpstan-010)

You need to require the version `0.1.0` of this package:

```
composer require --dev mavimo/phpstan-junit:~0.1.0

```

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

```

#### PHPStan 0.11

[](#phpstan-011)

The current version is not marked as stable (should be in some week), so you need to pull the version from master:

```
composer require --dev mavimo/phpstan-junit:~0.2.0

```

If you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set; 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

```

### Generate JUnit report

[](#generate-junit-report)

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

```
vendor/bin/phpstan --configuration=phpstan.neon --error-format=junit --level=7 --no-progress --no-interaction analyse SOURCE_CODE_DIR

```

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

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.6% 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 ~88 days

Total

2

Last Release

2528d ago

### Community

Maintainers

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

---

Top Contributors

[![mavimo](https://avatars.githubusercontent.com/u/43941?v=4)](https://github.com/mavimo "mavimo (35 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)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

78268.9M1.5k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

66466.6M1.1k](/packages/phpstan-phpstan-doctrine)[phpat/phpat

PHP Architecture Tester

1.2k3.5M32](/packages/phpat-phpat)[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.

33120.0M375](/packages/spaze-phpstan-disallowed-calls)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20729.0M124](/packages/mglaman-phpstan-drupal)

PHPackages © 2026

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