PHPackages                             studio-stomp/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. [Testing &amp; Quality](/categories/testing)
4. /
5. studio-stomp/phpstan-craftcms

ActivePhpstan-extension[Testing &amp; Quality](/categories/testing)

studio-stomp/phpstan-craftcms
=============================

Craft CMS extension for PHPStan

0.3.0(4y ago)320.6k↓84.7%[3 issues](https://github.com/studio-stomp/phpstan-craftcms/issues)[1 PRs](https://github.com/studio-stomp/phpstan-craftcms/pulls)1MITPHP ^7.4|^8.0CI passing

Since May 21Pushed 1y ago2 watchersCompare

[ Source](https://github.com/studio-stomp/phpstan-craftcms)[ Packagist](https://packagist.org/packages/studio-stomp/phpstan-craftcms)[ Docs](https://github.com/studio-stomp/phpstan-craftcms)[ RSS](/packages/studio-stomp-phpstan-craftcms/feed)WikiDiscussions main Synced yesterday

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

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

[](#phpstan-craftcms)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1f309d0ccbc42777963b1692f34f1655160deab92c811793752e51a057a76f21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73747564696f2d73746f6d702f7068707374616e2d6372616674636d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/studio-stomp/phpstan-craftcms)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/d19a9710d42ca42f0f71ce7f009cc6759e2e63972f4421b49a112d6894264b73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73747564696f2d73746f6d702f7068707374616e2d6372616674636d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/studio-stomp/phpstan-craftcms)

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

Install
-------

[](#install)

Via Composer

```
$ composer require --dev studio-stomp/phpstan-craftcms
```

Usage
-----

[](#usage)

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

```
includes:
    - vendor/studio-stomp/phpstan-craftcms/extension.neon
```

Add the level and paths as well to the project `phpstan.neon` / `phpstan.neon.dist`:

```
parameters:
    level: max # Or feel free to start at a lower level
    paths:
        - src # Common in plugins and other composer loaded packages
        - modules # Common in Craft CMS project
        - tests # Common in both
```

Feel free to check out the base configuration and expand on it with own configuration. For example:

```
includes:
    - vendor/studio-stomp/phpstan-craftcms/extension.neon

parameters:
    ignoreErrors:
        - '#Call to an undefined method SoapClient::#'
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Studio Stomp](https://github.com/studio-stomp)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~115 days

Total

5

Last Release

1772d ago

PHP version history (3 changes)0.1.0PHP ~7.3

0.2.1PHP ^7.3 || ^8.0

0.3.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/849c0af2d2cb9ad06d1b5bb546e3abeba351e08968f898c698458f6194ed9b38?d=identicon)[studio-stomp](/maintainers/studio-stomp)

---

Top Contributors

[![qrazi](https://avatars.githubusercontent.com/u/7550540?v=4)](https://github.com/qrazi "qrazi (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![studio-stomp](https://avatars.githubusercontent.com/u/51315691?v=4)](https://github.com/studio-stomp "studio-stomp (1 commits)")

---

Tags

studio-stompphpstan-craftcms

### Embed Badge

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

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

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

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[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)[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.

33422.6M549](/packages/spaze-phpstan-disallowed-calls)[tomasvotruba/cognitive-complexity

PHPStan rules to measure cognitive complexity of your classes and methods

1635.6M288](/packages/tomasvotruba-cognitive-complexity)

PHPackages © 2026

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