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(4mo ago)0274

Since Apr 12Pushed 4mo 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 1w 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

35

—

LowBetter than 77% of packages

Maintenance74

Regular maintenance activity

Popularity17

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

140d 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

[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k9.8M223](/packages/deptrac-deptrac)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67375.0M1.5k](/packages/phpstan-phpstan-doctrine)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136411.0k14](/packages/rector-rector-src)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87766.6k59](/packages/ticketswap-phpstan-error-formatter)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

39255.4k37](/packages/ec-europa-toolkit)[worksome/coding-style

Worksomes coding style

49826.1k69](/packages/worksome-coding-style)

PHPackages © 2026

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