# larastan/larastan

⚗️ Adds code analysis to Laravel improving developer productivity and code quality.

Repository: https://github.com/larastan/larastan
Canonical: https://ross.abutalabs.com/products/larastan
Language: PHP
License: MIT
License Family: permissive
Topics: laravel, phpstan, php, code-analysis
Last push: 2026-08-26T17:49:52+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 86, longevity 100
- inputs: {"age_days": 2987, "days_push": 7, "days_rel": 97, "gap_med": 9, "n_releases_24m": 38}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6493, forks 506 (observed 2026-08-28T04:09:43.832651+00:00)

## What it is
Larastan is a PHPStan extension that adds code analysis to Laravel applications, understanding Laravel's runtime magic to find bugs before tests are written. It boots the application container to resolve types that are only computable at runtime.

## Use cases
- find bugs in my laravel app before writing tests
- add static analysis to a laravel project
- improve code quality in php laravel codebase
- get type checking for laravel facades and eloquent models
- run phpstan on laravel with framework support

## When to choose
- you maintain a Laravel application or package and want static analysis
- you want PHPStan to understand Laravel's magic methods and container resolution
- you want to catch bug classes early in CI

## When to avoid
- your project is not built on Laravel
- you need generic PHP static analysis without framework-specific support (use plain PHPStan)

## Facets
- artifact type: library
- maturity: active
- function: linter, type-system, developer-tools, testing
- domain: developer-tools, web-development, backend
- platform: php, cli
- tags: laravel, phpstan, static-analysis, code-quality, php

## Member repositories
- larastan/larastan (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:43.832651+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:44:30.920413+00:00, confidence not recorded.
  - readme: https://github.com/larastan/larastan (fetched 2026-08-28T04:09:43.832651+00:00, sha cea683e6b367)
- Data as of 2026-08-30T08:39:29.467469+00:00.
