PHPackages                             fostercommerce/craft-phpstan - 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. fostercommerce/craft-phpstan

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fostercommerce/craft-phpstan
============================

A Foster Commerce fork of PHPStan configuration for Craft CMS projects

2.x-dev(3mo ago)07

Since Apr 12Pushed 3mo agoCompare

[ Source](https://github.com/FosterCommerce/craft-phpstan)[ Packagist](https://packagist.org/packages/fostercommerce/craft-phpstan)[ RSS](/packages/fostercommerce-craft-phpstan/feed)WikiDiscussions 2.x Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

PHPStan config for Craft CMS
============================

[](#phpstan-config-for-craft-cms)

This package provides a base [PHPStan](https://github.com/phpstan/phpstan) configuration for Craft CMS plugins and projects.

To install, run the following commands within your plugin or project:

```
composer config minimum-stability dev
```

```
composer config prefer-stable true
```

```
composer require craftcms/phpstan:dev-main --dev
```

Then add a `phpstan.neon` config file to the root of your project:

```
includes:
    - vendor/craftcms/phpstan/phpstan.neon

parameters:
    level: 0
    paths:
        - src
```

Change the `paths` array to whichever directory(s) contain the source code you want PHPStan to inspect.

(See PHPStan’s [Config Reference](https://phpstan.org/config-reference) for a full list of supported config parameters.)

With that in place, you can begin running PHPStan with the following command:

```
vendor/bin/phpstan --memory-limit=1G
```

Or define a `phpstan` script in `composer.json`:

```
{
  "...": "...",
  "scripts": {
    "phpstan": "phpstan --memory-limit=1G"
  }
}
```

And then run PHPStan with:

```
composer run-script phpstan
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance82

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% 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

Unknown

Total

1

Last Release

95d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ac5b96165dd51aed8f0b9ea079d5d5beeb430a915cd07d645db0a228b0ac3aa?d=identicon)[fostercommerce](/maintainers/fostercommerce)

---

Top Contributors

[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (4 commits)")[![johnnynotsolucky](https://avatars.githubusercontent.com/u/4161106?v=4)](https://github.com/johnnynotsolucky "johnnynotsolucky (3 commits)")

### Embed Badge

![Health badge](/badges/fostercommerce-craft-phpstan/health.svg)

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

###  Alternatives

[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87670.5k53](/packages/ticketswap-phpstan-error-formatter)[slam/phpstan-extensions

Slam extension of phpstan

712.5M77](/packages/slam-phpstan-extensions)[tomasvotruba/ctor

Prefer constructor over always called setters

1524.9k19](/packages/tomasvotruba-ctor)[ergebnis/rector-rules

Provides rules for rector/rector.

10226.6k48](/packages/ergebnis-rector-rules)[shopsys/coding-standards

Coding standards definition compatible with PSR-2

20276.8k20](/packages/shopsys-coding-standards)[johnbillion/wp-compat

PHPStan extension to help verify that your PHP code is compatible with a given version of WordPress

25152.4k15](/packages/johnbillion-wp-compat)

PHPackages © 2026

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