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)0181MITPHPPHP ^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 1mo ago

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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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

993d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dfec2e953df9e01a16d4cebd810aebc86832067d8a55df8c546c3917a5e89465?d=identicon)[ianef](/maintainers/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.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)[ekino/phpstan-banned-code

Detected banned code using PHPStan

2925.6M92](/packages/ekino-phpstan-banned-code)

PHPackages © 2026

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