PHPackages                             jensderond/phpstan-craftcms - 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. jensderond/phpstan-craftcms

ActiveLibrary

jensderond/phpstan-craftcms
===========================

CraftCMS extension for PHPStan

1.1.2(3mo ago)01.3k↓35%MITPHP

Since Oct 30Pushed 3mo agoCompare

[ Source](https://github.com/Jensderond/phpstan-craftcms)[ Packagist](https://packagist.org/packages/jensderond/phpstan-craftcms)[ RSS](/packages/jensderond-phpstan-craftcms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

phpstan-craftcms
================

[](#phpstan-craftcms)

[![Packagist Version](https://camo.githubusercontent.com/2da6a83a2c862c24b69372489309dcb417e74c57add61c6259b487afae211921/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a656e736465726f6e642f7068707374616e2d6372616674636d73)](https://camo.githubusercontent.com/2da6a83a2c862c24b69372489309dcb417e74c57add61c6259b487afae211921/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a656e736465726f6e642f7068707374616e2d6372616674636d73)

Extension for PHPStan for better support for Craft CMS. The following features are provided:

- Configure autoload of Craft CMS for analysis
- Stub to support different `ElementQuery`-classes
- Dependency injection container with `Craft::$container->get()`

Install
-------

[](#install)

Via Composer

```
$ composer require --dev jensderond/phpstan-craftcms
```

Usage
-----

[](#usage)

Add `phpstan-craftcms` to the project `phpstan.neon` / `phpstan.neon.dist`:

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

Credits
-------

[](#credits)

- [studio-stomp/phpstan-craftcms](https://github.com/studio-stomp/phpstan-craftcms)
- [marcusgaius/phpstan](https://github.com/marcusgaius/phpstan)
- [erickskrauch/phpstan-yii2](https://github.com/erickskrauch/phpstan-yii2)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance81

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

Total

4

Last Release

98d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ab5fe6ad2222d8ebbfedf7ace24b0e0c8647c9e321df07772ea39536fa69cd1?d=identicon)[jensderond](/maintainers/jensderond)

---

Top Contributors

[![Jensderond](https://avatars.githubusercontent.com/u/6972822?v=4)](https://github.com/Jensderond "Jensderond (10 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jensderond-phpstan-craftcms/health.svg)

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

###  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)[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)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

134391.5k12](/packages/rector-rector-src)[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)

PHPackages © 2026

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