awesome-repositories.com
Blog
MCP
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
larastan avatar

larastan/larastan

0
View on GitHub↗
6,430 estrellas·493 forks·PHP·MIT·4 vistas

Larastan

Larastan is a static analysis extension and type inference engine for PHP designed to detect bugs and type errors in Laravel applications. It extends PHPStan to resolve framework-specific patterns and magic methods, providing a rule-based scanning engine to audit code quality without executing the application.

The tool specializes in Eloquent analysis, verifying that model properties, casts, and relationships align with database schemas and migrations. It tracks types across Eloquent collections, custom builders, and model factories to ensure type safety during database operations and iteration.

Broad capability areas include configuration validation, view path verification, and the detection of inefficient database queries or redundant collection calls. The engine also audits job dispatch arguments, localization keys, and compatibility with long-running process environments.

Diagnostics include styled bootstrap error reporting to resolve startup failures, as well as mechanisms for error suppression and the establishment of legacy issue baselines.

Features

  • Code Quality and Analysis - Provides static analysis and linting to identify bugs and quality issues in Laravel applications without executing code.
  • Static Analysis Extensions - Provides a rule-based scanning engine to find bugs and logical errors in Laravel applications without executing the code.
  • Cast Configuration Validation - Checks that the return type and array shape of model casts match the expected configuration.
  • Relationship Validations - Validates database relationship methods by checking return types and string arguments.
  • ORM Component Validation - Validates custom builders and relations using generic templates to maintain type integrity across extended classes.
  • Relation Validations - Verifies that relations passed to builder methods exist to prevent runtime errors.
  • Builder Chain Validation - Validates method chains in custom query builders to ensure type safety during database queries.
  • Database Column Validation - Checks that strings used in model or builder methods correspond to actual database columns or properties.
  • Factory Type Validators - Analyzes model factories to verify they extend the base factory class with the correct model type.
  • Model Factory Type Analysis - Verifies the relationship between models and factory classes using template types to prevent type mismatches.
  • Type Safety - Enforces data integrity and prevents runtime crashes by ensuring correct data types for models, collections, and database relations.
  • Collection Type Refinement - Tracks the types of objects stored within custom collection classes to maintain type safety during iteration.
  • PHP Code Analysis - Scans PHP source code to identify inefficient database queries, unused views, and architectural violations.
  • Model Attribute Inference - Recognizes model properties defined via attributes by validating associated getter and setter method types.
  • Eloquent Collection Type Inference - Resolves collection type hints to specific model classes to ensure type safety during iteration.
  • Static Analysis Engines - Uses a rule-based scanning engine to detect bugs, type errors, and maintainability issues in PHP code.
  • Type Inference Engines - Automatically determines the data types of model properties and collection elements to enable deeper static analysis.
  • Database - Analyzes database migrations and schema dumps to determine the types and existence of model properties.
  • Code Quality Tools - Provides static analysis to identify dead views, inefficient queries, and redundant method calls to improve overall code quality.
  • Laravel Integrations - Extends PHPStan to resolve Laravel's magic methods and framework-specific architecture for deeper static analysis.
  • Schema Validation - Verifies that model properties, casts, and relationships match the actual database schema and configuration.
  • Static Analysis Rules - Provides specialized rules for analyzing Laravel applications to resolve magic methods and framework-specific patterns.
  • Static Query Analysis - Identifies collection method calls that should be performed as direct database queries to reduce memory usage.
  • Configuration Verification - Verifies that the return types of configuration helper functions match the actual configuration files.
  • Analysis Suppression Mechanisms - Disables specific error reports via inline comments or regex configurations to silence known issues.
  • Environment Variable Type Coercions - Infers the return type of environment functions based on provided default values to ensure type consistency.
  • Redundant Instantiation Detection - Flags the use of static creation methods where a simple new instance is more efficient.
  • Helper Call Constraints - Flags calls to environment helpers outside of configuration files to prevent runtime instability when config is cached.
  • Redundant Call Detection - Identifies unnecessary collection method calls that do not change the result and should be removed.
  • Resource Type Inference - Infers the underlying model class used within API resources to validate property and method calls.
  • Configuration Validation - Checks that keys passed to configuration methods point to arrays to prevent runtime type errors.
  • Job Dispatch Type Verification - Checks that arguments passed when dispatching a job are type-compatible with the job class constructor.
  • Long-Running Process Compatibility Analysis - Analyzes the codebase for patterns that are incompatible with long-running process environments.
  • Model Coding Standards Enforcement - Validates that appended computed properties exist and that local scopes and accessors are not public.
  • Provider Validation - Ensures deferrable service providers include the required provides method for correct bootstrapping.
  • Static Analysis Baselines - Records existing issues in a configuration file to prevent legacy errors from blocking stricter analysis levels.
  • Code Quality and Linting - Adds static analysis to Laravel via PHPStan.
  • Static Analysis - Adds static analysis capabilities to framework-specific projects.
  • Static Analysis Tools - Static analysis wrapper for Laravel applications.

Historial de estrellas

Gráfico del historial de estrellas de larastan/larastanGráfico del historial de estrellas de larastan/larastan

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Preguntas frecuentes

¿Qué hace larastan/larastan?

Larastan is a static analysis extension and type inference engine for PHP designed to detect bugs and type errors in Laravel applications. It extends PHPStan to resolve framework-specific patterns and magic methods, providing a rule-based scanning engine to audit code quality without executing the application.

¿Cuáles son las características principales de larastan/larastan?

Las características principales de larastan/larastan son: Code Quality and Analysis, Static Analysis Extensions, Cast Configuration Validation, Relationship Validations, ORM Component Validation, Relation Validations, Builder Chain Validation, Database Column Validation.

¿Qué alternativas de código abierto existen para larastan/larastan?

Las alternativas de código abierto para larastan/larastan incluyen: phan/phan — Phan is a static analyzer and type checker for PHP that identifies bugs and type incompatibilities without executing… phpstan/phpstan — This project is a static analysis engine and type checker designed for PHP codebases. It evaluates source code… facebook/flow — Flow is a JavaScript static type checker and AST parser that identifies type errors and prevents runtime failures… rectorphp/rector — Rector is an automated PHP refactoring and modernization tool designed to upgrade language versions and modernize… analysis-tools-dev/static-analysis — This project is a comprehensive, curated directory of static analysis, linting, and security scanning utilities. It… oclint/oclint — Oclint is a static analysis engine and extensible linting framework designed for C, C++, and Objective-C source code.…

Alternativas open-source a Larastan

Proyectos open-source similares, clasificados según cuántas características comparten con Larastan.
  • phan/phanAvatar de phan

    phan/phan

    5,617Ver en GitHub↗

    Phan is a static analyzer and type checker for PHP that identifies bugs and type incompatibilities without executing the code. It serves as a quality gate for continuous integration pipelines and a tool for verifying type safety, specifically checking union types, generics, and array shapes. The project is distinguished by its use of a background daemon and Language Server Protocol implementation, which provide real-time diagnostics and navigation within editors. It also features a baseline-based suppression system that allows developers to record existing errors in a snapshot file to focus e

    PHP
    Ver en GitHub↗5,617
  • phpstan/phpstanAvatar de phpstan

    phpstan/phpstan

    13,999Ver en GitHub↗

    This project is a static analysis engine and type checker designed for PHP codebases. It evaluates source code structure and type annotations to identify potential bugs, type mismatches, and logic errors without executing the application. By parsing code into an abstract syntax tree and applying a rule-based validation framework, it enforces code quality and safety standards across a project. What distinguishes this tool is its sophisticated type inference engine, which models dynamic language features, magic methods, and conditional types to maintain accuracy even in unconventional code. It

    PHPphpphp7phpstan
    Ver en GitHub↗13,999
  • facebook/flowAvatar de facebook

    facebook/flow

    22,232Ver en GitHub↗

    Flow is a JavaScript static type checker and AST parser that identifies type errors and prevents runtime failures through static annotations. It functions as a code intelligence engine and a static analysis linter to identify unsafe coding patterns and enforce consistency across a codebase. The project includes a type annotation stripper that removes static type signatures from source code, ensuring the resulting JavaScript is compatible with any runtime environment. It also provides a parser that converts typed JavaScript into an abstract syntax tree conforming to the ESTree specification.

    Rust
    Ver en GitHub↗22,232
  • rectorphp/rectorAvatar de rectorphp

    rectorphp/rector

    10,199Ver en GitHub↗

    Rector is an automated PHP refactoring and modernization tool designed to upgrade language versions and modernize syntax using predefined rules. It functions as a static analysis engine that inspects code structures and types to identify refactoring targets without executing the code. The project provides a framework for defining custom transformation logic to automate project-specific changes. It distinguishes itself by offering specialized capabilities for migrating legacy or custom frameworks to modern alternatives and converting docblock annotations into native language attributes. The s

    PHPastautomated-upgradesinstant-upgrades
    Ver en GitHub↗10,199
  • Ver las 30 alternativas a Larastan→