PHPackages                             symplify/phpstan-php-config - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. symplify/phpstan-php-config

Abandoned → [phpstan/phpstan](/?search=phpstan%2Fphpstan)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

symplify/phpstan-php-config
===========================

Use PHP config syntax to configure PHPStan in phpstan.php

v9.3.20(4y ago)25.2kMITPHPPHP &gt;=7.3

Since Nov 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/deprecated-packages/phpstan-php-config)[ Packagist](https://packagist.org/packages/symplify/phpstan-php-config)[ Fund](https://www.paypal.me/rectorphp)[ GitHub Sponsors](https://github.com/tomasvotruba)[ RSS](/packages/symplify-phpstan-php-config/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (115)Used By (0)

PHPStan PHP Config
==================

[](#phpstan-php-config)

[![Downloads](https://camo.githubusercontent.com/148a07b068fe4d04c2eae5277d6983d5a797ca1d3e912f979f7c3c33d6c77d73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d706c6966792f7068707374616e2d7068702d636f6e6669672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/symplify/phpstan-php-config/stats)

Use PHP config syntax to configure PHPStan in `phpstan.php`

---

Have you [switched from YAML to PHP configs](https://tomasvotruba.com/blog/2020/07/27/how-to-switch-from-yaml-xml-configs-to-php-today-with-symplify/) in Rector, ECS and Symfony projects? Do you still need [10 reasons why](https://tomasvotruba.com/blog/2020/07/16/10-cool-features-you-get-after-switching-from-yaml-to-php-configs/)?

In case you have, the `phpstan.neon` is probably the last one YAML-like config in your setup. Class renames are missed, so is autocomplete and prone to errors, since PHP-syntax is highly addictive.

**This package introduces `phpstan.php` syntax, so you can configure PHPStan in PHP.**

Install
-------

[](#install)

```
composer require symplify/phpstan-php-config --dev
```

Usage
-----

[](#usage)

Create `phpstan.php` and configure it, as any other Symfony project with PHP config:

```
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\PHPStanPHPConfig\ValueObject\Level;
use Symplify\PHPStanPHPConfig\ValueObject\Option;

return static function (ContainerConfigurator $containerConfigurator): void {
    $parameters = $containerConfigurator->parameters();

    $parameters->set(Option::LEVEL, Level::LEVEL_MAX);

    $parameters->set(Option::PATHS, [__DIR__ . '/packages']);

    $parameters->set(Option::PARALLEL_MAX_PROCESSES, 6);
    $parameters->set(Option::REPORT_UNMATCHED_IGNORED_ERRORS, false);
};
```

Then, add or extend "phpstan" scripts in your `composer.json`:

```
{
    "scripts": {
        "phpstan": [
            "vendor/bin/phpstan-php-config convert phpstan.php --output-file phpstan-converted.neon",
            "vendor/bin/phpstan analyse --ansi --config phpstan-converter.neon"
        ]
    }
}
```

Then run PHPStan as usual:

```
composer phpstan
```

If everything works well, you can drop the custom config path and `phpstan.neon` will be generated instead:

```
{
    "scripts": {
        "phpstan": [
            "vendor/bin/phpstan-php-config convert phpstan.php",
            "vendor/bin/phpstan analyse --ansi"
        ]
    }
}
```

Report Issues
-------------

[](#report-issues)

In case you are experiencing a bug or want to request a new feature head over to the [Symplify monorepo issue tracker](https://github.com/symplify/symplify/issues)

Contribute
----------

[](#contribute)

The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on [symplify/symplify](https://github.com/symplify/symplify).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Total

114

Last Release

1808d ago

Major Versions

8.3.48 → 9.0.0-BETA12020-11-14

PHP version history (2 changes)8.3.48PHP &gt;=7.2

9.0.0-rc1PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (14 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/symplify-phpstan-php-config/health.svg)

```
[![Health](https://phpackages.com/badges/symplify-phpstan-php-config/health.svg)](https://phpackages.com/packages/symplify-phpstan-php-config)
```

###  Alternatives

[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87578.8k35](/packages/ticketswap-phpstan-error-formatter)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

4743.5k10](/packages/phel-lang-phel-lang)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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