0.02
Laravel 11 – 13
PHP 8.2+
Repository is archived
There's a lot of open issues
Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

doctrine/coding-standard
^14.0
nikic/php-parser
^5.6
^11.44.2 || ^12.4.1 || ^13
mockery/mockery
^1.6
^v9.1.3 || ^10.0 || ^11
^9.5.2 || ^10.0 || ^11
phpstan/phpstan-deprecation-rules
^2.0.1
phpunit/phpunit
^10.5.35 || ^11.5.15 || ^12.5.8 || ^13.1.8

Runtime

^11.44.2 || ^12.4.1 || ^13
^11.44.2 || ^12.4.1 || ^13
^11.44.2 || ^12.4.1 || ^13
^11.44.2 || ^12.4.1 || ^13
^11.44.2 || ^12.4.1 || ^13
^11.44.2 || ^12.4.1 || ^13
^11.44.2 || ^12.4.1 || ^13
phpmyadmin/sql-parser
^5.9.0
phpstan/phpstan
^2.2.2
 Project Readme

Important

This fork has moved to calebdw/phpstan-laravel.

The work here outgrew what a fork could carry. Living downstream of Larastan meant every change had to stay compatible with it, which ruled out renaming confusing options, dropping old version shims, or reorganising anything. phpstan-laravel is the same work as its own package, free to make those decisions, with documentation to match.

composer remove --dev calebdw/larastan
composer require --dev calebdw/phpstan-laravel

The migration guide covers the rest: options now nest under laravel:, error identifiers are prefixed laravel. instead of larastan., and a few names changed to say what they actually do.

This fork is no longer maintained and will not be updated.

Larastan Logo

Larastan Example

Laravel Compatibility Test Results Total Downloads Latest Version License


⚗️ About This Fork

Hello! 👋

This was my fork of larastan/larastan, carrying features and improvements that had been proposed upstream but were not yet available there. It existed to give the community immediate access to those enhancements while staying compatible with the upstream package.

Tip

For Laravel Livewire support, check out larastan-livewire!

🔄 Changes and Upstream PRs

This fork includes the following changes and enhancements:

✨ Getting Started

To use this fork, you may use Composer to install it as a development dependency into your Laravel project:

composer require --dev "calebdw/larastan:^3.0"

Or if you already have the upstream package installed, you can point your composer.json to this fork:

- "larastan/larastan": "^3.0"
+ "calebdw/larastan": "^3.0"

If you have the PHPStan extension installer installed then nothing more is needed, otherwise you will need to manually include the extension in the phpstan.neon(.dist) configuration file:

includes:
    - ./vendor/calebdw/larastan/extension.neon

For more information on how to configure and use Larastan, please refer to the official documentation.

👊🏻 Contributing

Thank you for considering contributing to Larastan. All the contribution guidelines are mentioned here.

📄 License

This fork is open-sourced software licensed under the MIT license.