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

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

contao/phpstan
==============

Contao extension for PHPStan

0.12.9(5y ago)544.5k↑1508.3%12MITPHPPHP ^7.2 || ^8.0

Since Jul 24Pushed 5y ago4 watchersCompare

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

READMEChangelogDependencies (12)Versions (35)Used By (2)

PHPStan Contao Framework extensions and rules
=============================================

[](#phpstan-contao-framework-extensions-and-rules)

- [PHPStan](https://github.com/phpstan/phpstan)

This extension provides following features:

- Provides correct return types for Contao services.

[![GitHub](https://camo.githubusercontent.com/c446b3b24e160b1999293390fc5c523d5d43da4967720273ee20f344d6c39dc7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f636f6e74616f2f7068707374616e2f43492f6d6173746572)](https://github.com/contao/phpstan/actions)[![](https://camo.githubusercontent.com/5a6393e31f17017fd0f9b1fb41867414e18c4210119dda25c46fa39b8553a8ee/68747470733a2f2f636f6465636f762e696f2f67682f636f6e74616f2f7068707374616e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/contao/phpstan)[![](https://camo.githubusercontent.com/1336d590c7617475a9293ca52c5bba8b2b4788736afeefe2f94646601fda89fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e74616f2f7068707374616e2e737667)](https://packagist.org/packages/contao/phpstan)[![](https://camo.githubusercontent.com/ddad6f312e3734a55a8ca02c37f4e1747ba1f17b5f075b1030591b37bdb09539/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e74616f2f7068707374616e2e737667)](https://packagist.org/packages/contao/phpstan)

Usage
-----

[](#usage)

To use this extension, require it in [Composer](https://getcomposer.org/):

```
composer require --dev contao/phpstan
```

And include extension.neon in your project's PHPStan config:

```
includes:
    - vendor/contao/phpstan/extension.neon
    - vendor/phpstan/phpstan-symfony/extension.neon

parameters:
    contao:
        services_yml_path: %currentWorkingDirectory%/src/Resources/config/services.yml

    symfony:
        container_xml_path: %currentWorkingDirectory%/vendor/contao/phpstan/var/cache/dev/appDevPHPStanProjectContainer.xml

```

Limitations
-----------

[](#limitations)

You have to provide a path to `services.yml` or similar yml file describing your services.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 64.9% 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 ~26 days

Recently: every ~49 days

Total

34

Last Release

1974d ago

PHP version history (3 changes)0.1.0PHP ^7.1

0.12.3PHP ^7.2

0.12.8PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/87bf1d07a851471e5d0ba2052e6a7a78d6313378214087a2919ff9979656ad0b?d=identicon)[bytehead](/maintainers/bytehead)

![](https://www.gravatar.com/avatar/3de3a0dd7c29df679eb280585220c17c1a7340b46c2792d5e8298be859acfbba?d=identicon)[leofeyer](/maintainers/leofeyer)

![](https://www.gravatar.com/avatar/8c7bdddffcaec444b7891b633f45fe2713d2b04ff21a6362fd748720d0822d58?d=identicon)[ausi](/maintainers/ausi)

---

Top Contributors

[![bytehead](https://avatars.githubusercontent.com/u/754921?v=4)](https://github.com/bytehead "bytehead (50 commits)")[![leofeyer](https://avatars.githubusercontent.com/u/1192057?v=4)](https://github.com/leofeyer "leofeyer (25 commits)")[![aschempp](https://avatars.githubusercontent.com/u/1073273?v=4)](https://github.com/aschempp "aschempp (1 commits)")[![ausi](https://avatars.githubusercontent.com/u/367169?v=4)](https://github.com/ausi "ausi (1 commits)")

---

Tags

contaophpphpstan

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[mglaman/phpstan-drupal

Drupal extension and rules for PHPStan

20829.0M124](/packages/mglaman-phpstan-drupal)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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