PHPackages                             matesofmate/phpstan-extension - 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. matesofmate/phpstan-extension

ActiveSymfony-ai-mate[Testing &amp; Quality](/categories/testing)

matesofmate/phpstan-extension
=============================

PHPStan extension for Symfony AI Mate providing AI assistants with efficient static analysis tools

0.3.1(1w ago)06.1k↑51.9%MITPHPPHP &gt;=8.2CI failing

Since Jan 26Pushed 3d agoCompare

[ Source](https://github.com/MatesOfMate/phpstan-extension)[ Packagist](https://packagist.org/packages/matesofmate/phpstan-extension)[ RSS](/packages/matesofmate-phpstan-extension/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (25)Versions (5)Used By (0)

PHPStan Extension for Symfony AI Mate
=====================================

[](#phpstan-extension-for-symfony-ai-mate)

Token-efficient PHPStan analysis tools for AI assistants. This package runs PHPStan and returns encoded structured results geared toward debugging and iteration.

Features
--------

[](#features)

- analyse the full project or a selected file or directory
- clear PHPStan result cache
- three consistent compact output modes
- automatic configuration detection

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

[](#installation)

```
composer require --dev matesofmate/phpstan-extension
vendor/bin/mate init
```

In current AI Mate setups, extension discovery is handled automatically after Composer install and update. Run `vendor/bin/mate discover` when you want to refresh discovery artifacts such as `mate/AGENT_INSTRUCTIONS.md`.

Useful Mate commands:

```
vendor/bin/mate debug:extensions
vendor/bin/mate debug:capabilities
vendor/bin/mate mcp:tools:list --extension=matesofmate/phpstan-extension
```

Use the generated wrapper for Codex:

```
./bin/codex
```

Custom Command Configuration
----------------------------

[](#custom-command-configuration)

If PHPStan must run through Docker or another wrapper command, configure `matesofmate_phpstan.custom_command`.

```
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $container): void {
    $container->parameters()->set('matesofmate_phpstan.custom_command', [
        'docker', 'compose', 'exec', 'php', 'vendor/bin/phpstan',
    ]);
};
```

Requirements
------------

[](#requirements)

- PHP 8.2+
- Symfony AI Mate 0.8+ required
- PHPStan 2.x in the target project

Available Tools
---------------

[](#available-tools)

- `phpstan-analyse`
- `phpstan-clear-cache`

This package returns encoded strings through Mate's core `ResponseEncoder`. Install the suggested `helgesverre/toon` package if you want TOON responses; otherwise the same payload falls back to JSON.

Output Modes
------------

[](#output-modes)

- `default`
- `summary`
- `detailed`

Development
-----------

[](#development)

```
composer install
composer test
composer lint
composer fix
```

License
-------

[](#license)

MIT

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance99

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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 ~49 days

Total

4

Last Release

11d ago

### Community

Maintainers

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

---

Top Contributors

[![wachterjohannes](https://avatars.githubusercontent.com/u/1464615?v=4)](https://github.com/wachterjohannes "wachterjohannes (20 commits)")

---

Tags

symfonyPHPStanstatic analysismcpaiai assistantmate

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/matesofmate-phpstan-extension/health.svg)

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

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

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136406.3k14](/packages/rector-rector-src)[calebdw/larastan

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

15118.7k4](/packages/calebdw-larastan)

PHPackages © 2026

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