PHPackages                             xactsystems/phpstan-dev - 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. xactsystems/phpstan-dev

ActiveComposer-plugin[Testing &amp; Quality](/categories/testing)

xactsystems/phpstan-dev
=======================

Package to extract and provide PHPStan source code for developing custom rules

v1.0.2(2y ago)0191MITPHPPHP ^7.4 || ^8.0

Since Aug 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/XactSystems/phpstan-dev)[ Packagist](https://packagist.org/packages/xactsystems/phpstan-dev)[ RSS](/packages/xactsystems-phpstan-dev/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (3)Used By (1)

xactsystems/phpstan-dev
=======================

[](#xactsystemsphpstan-dev)

A package to extract and provide PHPStan source code for developing custom rules.

PHPStan does not provide a method to load the source code via a package manager. Instead it needs extracting from the .phar archive.

If you use PHPStorm of PHP Tools by DEVSENSE then this issue is covered, but not everyone does!

Personally I think this whole approach goes against the ethos of a package manager, it should just be a package!

So, I've created this composer plugin that requires phpstan as a dependency, extracts the source code, and links the PHPStan namespace to it.

Installation
------------

[](#installation)

To use this extension, require it in Composer:

```
composer require --dev xactsystems/phpstan-dev
```

Authorise the plugin, please answer y to the following prompt: xactsystems/phpstan-dev contains a Composer plugin which is currently not in your allow-plugins config. See Do you trust "xactsystems/phpstan-dev" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) \[y,n,d,?\] y

Usage
-----

[](#usage)

This plugin will expose the \\PHPStan namespace so that you can create your custom rules and collectors.

See the following pages for more details:

Why a plugin?
-------------

[](#why-a-plugin)

Although there are events within the Composer ecosystem, none of these fire for the packages being managed, they fire only for the top level package that is requiring them. Composer plugins on the other hand fire within the package being required.

In this situation we simply use the Activate method to check and see if the PHPStan source code has been extracted. If it's not we do so.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

1040d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5128087?v=4)[Ian Foulds](/maintainers/ianef)[@ianef](https://github.com/ianef)

---

Top Contributors

[![ianef](https://avatars.githubusercontent.com/u/5128087?v=4)](https://github.com/ianef "ianef (8 commits)")

### Embed Badge

![Health badge](/badges/xactsystems-phpstan-dev/health.svg)

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

###  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)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[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)[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)
