PHPackages                             prettyyellowdog/lumenstan - 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. prettyyellowdog/lumenstan

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

prettyyellowdog/lumenstan
=========================

Lumenstan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Lumen based on Larastan

3.x-dev(8mo ago)0169MITPHPPHP ^8.2

Since Aug 29Pushed 8mo agoCompare

[ Source](https://github.com/prettyyellowdog/lumenstan)[ Packagist](https://packagist.org/packages/prettyyellowdog/lumenstan)[ GitHub Sponsors](https://github.com/canvural)[ RSS](/packages/prettyyellowdog-lumenstan/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelogDependencies (17)Versions (1)Used By (0)

About Lumenstan
---------------

[](#about-lumenstan)

Lumenstan is a fork of [Larastan](https://github.com/larastan/larastan) specifically to maintain compatibility with [Lumen](https://github.com/laravel/lumen-framework). While the Lumen framework is no longer actively supported by the Laravel team, this fork is for those updating and maintaining Lumen projects already in the field.

 [![Larastan Logo](https://raw.githubusercontent.com/larastan/larastan/master/docs/logo.png)](https://raw.githubusercontent.com/larastan/larastan/master/docs/logo.png)

 [![Larastan Example](https://raw.githubusercontent.com/larastan/larastan/master/docs/example.png)](https://raw.githubusercontent.com/larastan/larastan/master/docs/example.png)

 [![License](https://camo.githubusercontent.com/257e82070c253d9b48251a07e757627e59abb7cb9d95453179b19354b048d2dd/68747470733a2f2f706f7365722e707567782e6f72672f6c6172617374616e2f6c6172617374616e2f6c6963656e73652e737667)](https://github.com/larastan/larastan/blob/master/LICENSE.md)

---

⚗️ About Larastan
-----------------

[](#️-about-larastan)

Larastan was created by [Can Vural](https://github.com/canvural) and [Nuno Maduro](https://github.com/nunomaduro), got artwork designed by [@Caneco](http://github.com/caneco), is maintained by [Can Vural](https://github.com/canvural), [Nuno Maduro](https://github.com/nunomaduro) and [Viktor Szépe](https://github.com/szepeviktor), and is a [PHPStan](https://phpstan.org/) extension for Laravel. Larastan focuses on **finding errors in your code**. It catches whole classes of bugs even **before you write tests** for the code.

- Adds static typing to Laravel to improve developer productivity and **code quality**
- Supports most of [Laravel](https://laravel.com)'s **beautiful magic**
- Discovers bugs in your code

> While by definition, "static analysis" doesn't load any of your application's code. Larastan boots your application's container, so it can resolve types that are only possible to compute at runtime. That's why we use the term "code analysis" instead of "static analysis".

### Supported Laravel versions

[](#supported-laravel-versions)

Laravel VersionLarastan Version&lt; 91.x&gt; 9.0 &amp;&amp; &gt;= 11.162.x11.16+3.0+Sponsors
--------

[](#sponsors)

[![Blackfire.io](assets/blackfire-logo.png)](https://blackfire.io/docs/introduction?utm_source=larastan&utm_medium=github_readme&utm_campaign=logo)

✨ Getting Started In 3 Steps
----------------------------

[](#-getting-started-in-3-steps)

> **Requires:**

- **[PHP 8.2+](https://php.net/releases/)**
- **[Laravel 11.15+](https://github.com/laravel/laravel)**

**1**: First, you may use [Composer](https://getcomposer.org) to install Larastan as a development dependency into your Laravel project:

```
composer require --dev "prettyyellowdog/lumenstan:^3.0"
```

> Using Larastan for analysing Laravel packages? You may need to install `orchestra/testbench`.

**2**: Then, create a `phpstan.neon` or `phpstan.neon.dist` file in the root of your application. It might look like this:

```
includes:
    - vendor/larastan/larastan/extension.neon
    - vendor/nesbot/carbon/extension.neon

parameters:

    paths:
        - app/

    # Level 10 is the highest level
    level: 5

#    ignoreErrors:
#        - '#PHPDoc tag @var#'
#
#    excludePaths:
#        - ./*/*/FileToBeExcluded.php

```

For all available options, please take a look at the PHPStan documentation: ****

**3**: Finally, you may start analyzing your code using the phpstan console command:

```
./vendor/bin/phpstan analyse
```

If you are getting the error `Allowed memory size exhausted`, then you can use the `--memory-limit` option fix the problem:

```
./vendor/bin/phpstan analyse --memory-limit=2G
```

Ignoring errors
---------------

[](#ignoring-errors)

Ignoring a specific error can be done either with a php comment or in the configuration file:

```
// @phpstan-ignore-next-line
$test->badMethod();

$test->badMethod(); // @phpstan-ignore-line
```

When ignoring errors in PHPStan's configuration file, they are ignored by writing a regex based on error messages:

```
parameters:
    ignoreErrors:
        - '#Call to an undefined method .*badMethod\(\)#'
```

### Baseline file

[](#baseline-file)

In older codebases it might be hard to spend the time fixing all the code to pass a high PHPStan Level.

To get around this a baseline file can be generated. The baseline file will create a configuration file with all of the current errors, so new code can be written following a higher standard than the old code. ([PHPStan Docs](https://phpstan.org/user-guide/baseline))

```
./vendor/bin/phpstan analyse --generate-baseline
```

Rules
-----

[](#rules)

A list of configurable rules specific to Laravel can be found [here](docs/rules.md).

Features
--------

[](#features)

A list of Larastan features can be found [here](docs/features.md).

Custom PHPDoc types
-------------------

[](#custom-phpdoc-types)

A list of PHPDoc types specific to Larastan can be found [here](docs/custom-types.md).

Custom PHPStan config parameters
--------------------------------

[](#custom-phpstan-config-parameters)

A list of custom config parameters that you can use in your PHPStan config file can be found [here](docs/custom-config-parameters.md).

Errors To Ignore
----------------

[](#errors-to-ignore)

Some parts of Laravel are currently too magical for Larastan/PHPStan to understand. We listed common [errors to ignore](docs/errors-to-ignore.md), add them as needed

👊🏻 Contributing
---------------

[](#-contributing)

Thank you for considering contributing to Larastan. All the contribution guidelines are mentioned [here](CONTRIBUTING.md).

📖 License
---------

[](#-license)

Larastan is an open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance63

Regular maintenance activity

Popularity11

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

253d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80f46dda2c2dce586c040f0d63c37f0a3458c3a3ad84b605640b13173dccf42c?d=identicon)[prettyyellowdog](/maintainers/prettyyellowdog)

---

Top Contributors

[![canvural](https://avatars.githubusercontent.com/u/1574232?v=4)](https://github.com/canvural "canvural (669 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (460 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (181 commits)")[![calebdw](https://avatars.githubusercontent.com/u/4176520?v=4)](https://github.com/calebdw "calebdw (58 commits)")[![Daanra](https://avatars.githubusercontent.com/u/6588838?v=4)](https://github.com/Daanra "Daanra (35 commits)")[![ondrejmirtes](https://avatars.githubusercontent.com/u/104888?v=4)](https://github.com/ondrejmirtes "ondrejmirtes (24 commits)")[![spawnia](https://avatars.githubusercontent.com/u/12158000?v=4)](https://github.com/spawnia "spawnia (23 commits)")[![mad-briller](https://avatars.githubusercontent.com/u/28307684?v=4)](https://github.com/mad-briller "mad-briller (17 commits)")[![CyberiaResurrection](https://avatars.githubusercontent.com/u/9083866?v=4)](https://github.com/CyberiaResurrection "CyberiaResurrection (14 commits)")[![kylekatarnls](https://avatars.githubusercontent.com/u/5966783?v=4)](https://github.com/kylekatarnls "kylekatarnls (12 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (11 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (9 commits)")[![erikgaal](https://avatars.githubusercontent.com/u/1234268?v=4)](https://github.com/erikgaal "erikgaal (8 commits)")[![johanvanhelden](https://avatars.githubusercontent.com/u/19389981?v=4)](https://github.com/johanvanhelden "johanvanhelden (8 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (8 commits)")[![mr-feek](https://avatars.githubusercontent.com/u/5747667?v=4)](https://github.com/mr-feek "mr-feek (7 commits)")[![BertvanHoekelen](https://avatars.githubusercontent.com/u/7521173?v=4)](https://github.com/BertvanHoekelen "BertvanHoekelen (7 commits)")[![crissi](https://avatars.githubusercontent.com/u/3076578?v=4)](https://github.com/crissi "crissi (7 commits)")[![0xb4lint](https://avatars.githubusercontent.com/u/3747631?v=4)](https://github.com/0xb4lint "0xb4lint (7 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (6 commits)")

---

Tags

phpPHPStanlaravelstatic analysispackagelumencode analysiscode analyselarastanlumenstan

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/prettyyellowdog-lumenstan/health.svg)

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

###  Alternatives

[larastan/larastan

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

6.4k43.5M5.1k](/packages/larastan-larastan)[calebdw/larastan

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

1484.6k3](/packages/calebdw-larastan)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M529](/packages/laravel-passport)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M106](/packages/laravel-cashier)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)

PHPackages © 2026

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