PHPackages                             antlr/antlr-php-runtime-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. antlr/antlr-php-runtime-phpstan

ActivePhpstan-extension[Utility &amp; Helpers](/categories/utility)

antlr/antlr-php-runtime-phpstan
===============================

ANTLR4 PHP Runtime extensions for PHPStan.

0.3.0(4y ago)620.2k2BSD-3-ClausePHPPHP ^7.2 || ^8.0CI failing

Since Nov 16Pushed 4y ago2 watchersCompare

[ Source](https://github.com/antlr/antlr-php-runtime-phpstan)[ Packagist](https://packagist.org/packages/antlr/antlr-php-runtime-phpstan)[ RSS](/packages/antlr-antlr-php-runtime-phpstan/feed)WikiDiscussions master Synced 3w ago

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

ANTLR4 Extension for PHPStan
============================

[](#antlr4-extension-for-phpstan)

[![Travis CI](https://camo.githubusercontent.com/2a8a77093d5c3210ef91ddd8033915291710c7f8912e3dcfff51b297f28b5a4d/68747470733a2f2f6170692e7472617669732d63692e6f72672f616e746c722f616e746c722d7068702d72756e74696d652d7068707374616e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/antlr/antlr-php-runtime-phpstan)[![Latest Stable Version](https://camo.githubusercontent.com/4a821c6e7327525c97f2eb5ac146c57429db3e62d86346eeda84f9997ad8d435/68747470733a2f2f706f7365722e707567782e6f72672f616e746c722f616e746c722d7068702d72756e74696d652d7068707374616e2f762f737461626c65)](https://packagist.org/packages/antlr/antlr-php-runtime-phpstan)[![License](https://camo.githubusercontent.com/730b0d8ce19957ee4b0b28a7f01d28756ab33539364c78a4f4df8bdabc88dc2e/68747470733a2f2f706f7365722e707567782e6f72672f616e746c722f616e746c722d7068702d72756e74696d652d7068707374616e2f6c6963656e7365)](https://packagist.org/packages/antlr/antlr-php-runtime-phpstan)

Static analysis for [ANTLR4 PHP Runtime](https://github.com/antlr/antlr-php-runtime).

Features
--------

[](#features)

This extension provides correct return type for context's sub-rule getters.

Install
-------

[](#install)

Using Composer:

```
composer require --dev antlr/antlr-php-runtime-phpstan
```

Register Plugin
---------------

[](#register-plugin)

If you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set!

 Manual installationIf you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:

```
includes:
    - vendor/antlr/antlr-php-runtime-phpstan/extension.neon
```

Testing
-------

[](#testing)

To run all unit tests, use the locally installed PHPUnit:

```
./vendor/bin/phpunit
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~244 days

Total

4

Last Release

1685d ago

PHP version history (2 changes)0.1-betaPHP ^7.2

0.2.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/852b68d33dbeea07cd7613fbf8967e47556b485398b1aa75a604d0a976899f3e?d=identicon)[marcospassos](/maintainers/marcospassos)

---

Top Contributors

[![marcospassos](https://avatars.githubusercontent.com/u/943036?v=4)](https://github.com/marcospassos "marcospassos (4 commits)")[![amorimjuliana](https://avatars.githubusercontent.com/u/11818859?v=4)](https://github.com/amorimjuliana "amorimjuliana (2 commits)")

---

Tags

antlr4php7phpstanphpPHPStanantlr4

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/antlr-antlr-php-runtime-phpstan/health.svg)

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

###  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)[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)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87718.9k56](/packages/ticketswap-phpstan-error-formatter)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15118.7k4](/packages/calebdw-larastan)[johnbillion/wp-compat

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

25166.1k18](/packages/johnbillion-wp-compat)[orrison/meliorstan

Provides PHPStan rules for improved code quality by detecting code smells and possible issues. In addition to enforcing particular naming and code style conventions to reduce bike-shedding.

1915.9k5](/packages/orrison-meliorstan)

PHPackages © 2026

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