#1616th of 43 in Code review and testing

larastan

PHPStan extension that finds type errors and bugs in Laravel code

Stars
6.6k
License
MIT
Last commit
Nov 2026
Last release
Nov 2026
Language
PHP
Stars, last 29 weeks+224
21 Apr 2026: 6,329 stars28 Apr 2026: 6,334 stars5 May 2026: 6,341 stars12 May 2026: 6,358 stars19 May 2026: 6,366 stars26 May 2026: 6,368 stars2 Jun 2026: 6,375 stars9 Jun 2026: 6,388 stars16 Jun 2026: 6,398 stars23 Jun 2026: 6,403 stars30 Jun 2026: 6,411 stars7 Jul 2026: 6,420 stars14 Jul 2026: 6,424 stars21 Jul 2026: 6,431 stars28 Jul 2026: 6,440 stars4 Aug 2026: 6,451 stars11 Aug 2026: 6,461 stars18 Aug 2026: 6,471 stars25 Aug 2026: 6,473 stars1 Sept 2026: 6,484 stars8 Sept 2026: 6,484 stars15 Sept 2026: 6,494 stars22 Sept 2026: 6,507 stars29 Sept 2026: 6,518 stars6 Oct 2026: 6,524 stars13 Oct 2026: 6,533 stars20 Oct 2026: 6,539 stars27 Oct 2026: 6,540 stars3 Nov 2026: 6,549 stars10 Nov 2026: 6,553 stars

6,329 on 21 Apr 20266,553 on 10 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Larastan is a PHPStan extension for Laravel, installed as a Composer dev dependency. It boots the application container so it can resolve types that only exist at runtime, such as Eloquent magic, and reports errors at PHPStan levels up to 10. It is not an AI tool; it is rule-based code analysis that runs locally or in CI.

Who it is for: Laravel developers who want static analysis locally and in CI

Strengths

  • Resolves much of Laravel's magic by booting the app container to compute types
  • Baseline files let legacy codebases adopt a higher PHPStan level gradually
  • Composer install plus a phpstan.neon file; no service to run
  • Adds Laravel-specific rules, custom PHPDoc types and config parameters

Weaknesses

  • Not AI-based; a rule-based static analyser that fits this list loosely
  • Version 3.x needs PHP 8.2+ and Laravel 11.15+
  • Boots the application during analysis, and large projects may hit memory limits
  • Some Laravel magic still needs entries in an ignore-errors list

What it needs

  • no GPU
  • Needs PHP 8.2+, Laravel 11.15+, Composer, PHPStan

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe.

Also in Code review and testing

See all 43
Also in Code review and testing
RankProjectScore
1playwrightCross-browser automation and end-to-end test framework for Chromium, Firefox and WebKit100k stars+2,481 (+2.5%) in 30 daysApache-2.094 out of 100
2nxMonorepo build system with task caching, affected-only runs and CI integration29.5k starsMIT93 out of 100
3open-code-reviewGo CLI that reviews Git diffs with an LLM agent and line-level comments50k stars+3,413 (+7.3%) in 30 daysApache-2.092 out of 100
#4bendDependent-typed language where AI-written code must prove rules in LAWS.bend Live demo ↗ (opens in a new tab)25k starsApache-2.088 out of 100
#5maestroYAML-based UI and end-to-end test framework for Android, iOS and web16.4k starsApache-2.088 out of 100