awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
phan avatar

phan/phan

0
View on GitHub↗
5,617 stars·370 forks·PHP·13 vuesgithub.com/phan/phan/wiki↗

Phan

Phan est un analyseur statique et vérificateur de type pour PHP qui identifie les bugs et les incompatibilités de type sans exécuter le code. Il sert de porte de qualité pour les pipelines d'intégration continue et d'outil pour vérifier la sécurité des types, en vérifiant spécifiquement les types union, les génériques et les formes de tableaux.

Le projet se distingue par l'utilisation d'un démon en arrière-plan et d'une implémentation du Language Server Protocol, qui fournissent des diagnostics et une navigation en temps réel au sein des éditeurs. Il dispose également d'un système de suppression basé sur une ligne de base (baseline) qui permet aux développeurs d'enregistrer les erreurs existantes dans un fichier instantané pour se concentrer exclusivement sur les nouvelles régressions.

Le moteur d'analyse couvre un large éventail de capacités, incluant la détection de code mort, la validation de compatibilité linguistique entre différentes versions de PHP, et l'inférence de types de variables et de modèles. Il prend en charge une analyse extensible via un système de plugins et fournit des corrections de code automatisées pour un sous-ensemble de problèmes détectés.

Les utilisateurs peuvent amorcer le processus en générant un fichier de configuration avec des niveaux de rigueur sélectionnables pour valider progressivement leur base de code.

Features

  • Type Safety - Analyze union types, generics, array shapes, and nullability to identify type incompatibilities and potential bugs.
  • PHP Type Checkers - Finding bugs and type incompatibilities in PHP code without running the application.
  • Code Quality and Analysis - Identifies dead code, unreachable blocks, and undefined variables to improve overall codebase health.
  • IDE Real-time Feedback - Delivers real-time analysis results and remediation guidance directly within the code editor.
  • Language Server Protocol Implementations - A background daemon that provides real-time PHP analysis and IDE integration via a standard protocol.
  • Language Server Protocols - Implements the Language Server Protocol to provide real-time diagnostics and navigation in editors.
  • CI/CD Pipeline Integrations - Provides native support for automating quality checks and build failures within CI/CD pipelines.
  • Dead Code Analysis - Detects unreachable code, unused variables, and redundant conditions to eliminate dead code.
  • Type Inference Refinement - Deduce the type of a variable based on inline assertions or conditional branches to refine type checking.
  • Dead Code Detection - Identifying unused variables, unreachable code blocks, and redundant conditions to clean up PHP codebases.
  • Type Inference Support - Determine variable types by analyzing assert statements and conditional logic within loops or branches.
  • Type Annotations - Parses and verifies PHPDoc annotations for union types, generics, and array shapes.
  • Type Checking - Warn when any type within a union cannot be cast to an expected type for method invocations.
  • Common Bug Detection - Detects semantic bugs, type incompatibilities, and unsafe type usage in real time during development.
  • Issue Baselining - Records known errors into a baseline snapshot to filter out legacy warnings and identify new regressions.
  • Static Type Checking - Check that assigned values and return types match a defined union of multiple possible types.
  • Type Inference Engines - Features a type inference engine that deduces variable and union types through conditional logic.
  • Strictness Levels - Offers selectable strictness levels to allow teams to gradually introduce more rigorous type checking.
  • Static Analysis AST Parsing - Uses abstract syntax tree parsing to detect structural errors and programmatic bugs without executing code.
  • CI/CD Integrations - Automating code quality checks and build failures within a continuous integration pipeline for PHP projects.
  • Definition Navigation - Allows developers to jump directly from a symbol's usage to its original source or type definition.
  • On-Demand File Analysis - Provides near-instant feedback by analyzing specific files on demand using a background daemon.
  • Analysis Result Exporters - Outputs analysis findings in multiple formats like JSON and CSV for integration with other quality tools.
  • Interface Stub Files - Uses interface stub files to represent third-party library types without processing their entire source code.
  • Template Type Inference - Determine the concrete type of a template by analyzing function arguments, array elements, or class-string parameters.
  • Incremental Analysis Daemons - Provides a background daemon that maintains codebase state in memory for rapid incremental analysis.
  • Deprecated Feature Markings - Identify functions, methods, or classes that should no longer be used by marking them as deprecated.
  • Language Compatibility Checkers - Checking for backward compatibility issues and ensuring code works across different PHP versions.
  • Language Compatibility Validations - Check for backward compatibility issues across different language versions and ensure inherited method signature compatibility.
  • Analysis Plugin Frameworks - Provides a plugin system to implement custom rules and processors for detecting project-specific bug patterns.
  • Analysis Speed Optimizations - Reduces execution time by distributing workloads across CPU cores and using optimized quick-mode checks.
  • Automated Code Fixes - Automatically resolves a subset of detected issues by applying programmatic byte-range edits to the source.
  • Version Compatibility Analyzers - Check for correct usage of version-specific language features and identify deprecated attributes across different versions.
  • Consistency Verifications - Check that generic classes declare template types and maintain those types when extended by subclasses.
  • Incremental Analysis Engines - Optimizes performance by re-analyzing only modified files and their affected dependencies.
  • Analysis Pipeline Hooks - Allows extending the analysis engine via custom plugins that hook into AST node processing.
  • Static Analysis Extensions - Provides a framework for creating custom rules and plugins to extend static code analysis.
  • Build Gating Tools - A static analysis tool that returns standard exit codes and formatted reports to automate PHP build failures.
  • Static Analysis - Analyzes code for errors using abstract syntax trees.
  • Static Analysis Tools - Modern static analyzer for PHP.
  • Static Analysis - Analyzes PHP codebases to identify potential security and quality issues.

Historique des stars

Graphique de l'historique des stars pour phan/phanGraphique de l'historique des stars pour phan/phan

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Phan

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Phan.
  • phpstan/phpstanAvatar de phpstan

    phpstan/phpstan

    13,999Voir sur 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
    Voir sur GitHub↗13,999
  • luals/lua-language-serverAvatar de LuaLS

    LuaLS/lua-language-server

    4,298Voir sur GitHub↗

    lua-language-server is a static analysis tool and type checker for the Lua language that implements the Language Server Protocol. It provides a system for detecting type mismatches, unused code, and logic errors in source files. The project features an inference-based type system that deduces variable types and supports optional annotations and meta files to enforce type safety. It allows for the definition of custom types and function signatures, including support for overloads and member visibility controls. The server provides a broad set of IDE capabilities, including real-time code auto

    Luahacktoberfestlanguage-serverlpeg
    Voir sur GitHub↗4,298
  • larastan/larastanAvatar de larastan

    larastan/larastan

    6,430Voir sur GitHub↗

    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 iterati

    PHP
    Voir sur GitHub↗6,430
  • pycqa/pylintAvatar de PyCQA

    PyCQA/pylint

    5,685Voir sur GitHub↗

    Pylint is a static code analysis tool for Python that checks source code for errors, coding standard violations, and code smells without executing the program. It parses code into an abstract syntax tree and walks the tree to detect issues, enforces configurable style rules and naming conventions, and identifies duplicate code blocks by comparing tokenised source sequences. The tool also includes an inference engine that deduces variable types by simulating code paths, enabling deeper analysis even in untyped code. What distinguishes Pylint is its plugin-based checker architecture, which allo

    Python
    Voir sur GitHub↗5,685
Voir les 30 alternatives à Phan→

Questions fréquentes

Que fait phan/phan ?

Phan est un analyseur statique et vérificateur de type pour PHP qui identifie les bugs et les incompatibilités de type sans exécuter le code. Il sert de porte de qualité pour les pipelines d'intégration continue et d'outil pour vérifier la sécurité des types, en vérifiant spécifiquement les types union, les génériques et les formes de tableaux.

Quelles sont les fonctionnalités principales de phan/phan ?

Les fonctionnalités principales de phan/phan sont : Type Safety, PHP Type Checkers, Code Quality and Analysis, IDE Real-time Feedback, Language Server Protocol Implementations, Language Server Protocols, CI/CD Pipeline Integrations, Dead Code Analysis.

Quelles sont les alternatives open-source à phan/phan ?

Les alternatives open-source à phan/phan incluent : phpstan/phpstan — This project is a static analysis engine and type checker designed for PHP codebases. It evaluates source code… luals/lua-language-server — lua-language-server is a static analysis tool and type checker for the Lua language that implements the Language… larastan/larastan — Larastan is a static analysis extension and type inference engine for PHP designed to detect bugs and type errors in… pycqa/pylint — Pylint is a static code analysis tool for Python that checks source code for errors, coding standard violations, and… dequelabs/axe-core — axe-core is an automated accessibility testing engine and compliance auditor designed to scan web and mobile… terraform-linters/tflint — TFLint is a static analysis tool and infrastructure-as-code validator designed to identify errors and enforce best…