PHP Static Analysis

Open-source PHP projects categorized as Static Analysis

Top 23 PHP Static Analysis Projects

Static Analysis
  • PHP Parser

    A PHP parser written in PHP

    Project mention: PHP 8.4 Released | news.ycombinator.com | 2024-11-21

    Once rector gets 8.4 rules out, this will be pretty awesome:

    https://github.com/rectorphp/rector/issues/8701

    https://github.com/nikic/PHP-Parser/commit/7b0384cdbe03431c4...

  • Cloudways

    Cloudways' Black Friday Offer - 1st Choice of Developers. Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.

    Cloudways logo
  • PHPStan

    PHP Static Analysis Tool - discover bugs in your code without running it!

    Project mention: Build a Symfony 7 boilerplate using FrankenPHP, Docker, PostgreSQL and php 8.4 | dev.to | 2024-12-23

    To do so simply install the runtime/frankenphp-symfony composer package. Then we install the bare minimum for a kick ass developer experience, a linter using Code Sniffer, phpstan as code quality audit tool, Rector to ease and automate code maintenance, some useful Symfony components and package and of course the Doctrine ORM. Here the composer.json file located at the symfony folder root.

  • PHP CS Fixer

    A tool to automatically fix PHP Coding Standards issues

    Project mention: Automate Your PHP Code Formatting with PHP-CS-Fixer | news.ycombinator.com | 2024-08-15
  • Psalm

    A static analysis tool for finding errors in PHP applications

    Project mention: Laravel code-quality tools | dev.to | 2024-02-08

    Psalm is a static analysis tool for PHP. Much like PHPStan is to Larastan, Psalm has a plugin called Laravel Psalm that allows you to easily use it in Laravel projects.

  • phan

    Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.

  • Deptrac

    Keep your architecture clean.

  • PHP Mess Detector

    PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • PHPCompatibility

    PHP Compatibility check for PHP_CodeSniffer

    Project mention: PHPCompatibility: Ensure Your Code Is Future-Proof with PHP_CodeSniffer | news.ycombinator.com | 2024-08-15
  • php-language-server

    PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥

  • PHP Architecture Tester

    PHP Architecture Tester - Easy architecture testing for PHP :heavy_check_mark:

  • PHP Code Sniffer

    PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

    Project mention: Build a Symfony 7 boilerplate using FrankenPHP, Docker, PostgreSQL and php 8.4 | dev.to | 2024-12-23

    To do so simply install the runtime/frankenphp-symfony composer package. Then we install the bare minimum for a kick ass developer experience, a linter using Code Sniffer, phpstan as code quality audit tool, Rector to ease and automate code maintenance, some useful Symfony components and package and of course the Doctrine ORM. Here the composer.json file located at the symfony folder root.

  • enlightn

    Your performance & security consultant, an artisan command away.

    Project mention: Laravel code-quality tools | dev.to | 2024-02-08

    Enlightn scans your code to check whether it follows best practices in performance, security, and reliability. It's a paid tool, but it also has free checks you can use. At the time of writing, it has 64 checks in the free version and 128 checks in the paid version. For the purposes of this article, we'll only be using the free version.

  • phpstan-strict-rules

    Extra strict and opinionated rules for PHPStan

  • BackwardCompatibilityCheck

    :ab: Tool to compare two revisions of a class API to check for BC breaks

  • phpmnd

    PHP Magic Number Detector

  • unused-scanner

    Detect unused composer dependencies

  • phpstan-deprecation-rules

    PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.

    Project mention: How to Avoid Adding New Code that Uses Deprecated Code? | dev.to | 2024-06-25

    Now install the PHPStan deprecation plugin from GitHub.

  • Exakat

    The Exakat Engine : smart static analysis for PHP

  • psalm-plugin-laravel

    A Psalm plugin for Laravel

    Project mention: Laravel code-quality tools | dev.to | 2024-02-08

    Psalm is a static analysis tool for PHP. Much like PHPStan is to Larastan, Psalm has a plugin called Laravel Psalm that allows you to easily use it in Laravel projects.

  • phpstan-wordpress

    WordPress extensions for PHPStan ⛏️

  • phpstan-disallowed-calls

    PHPStan rules to detect disallowed method & function calls, constant, namespace, attribute & superglobal usages

    Project mention: Firewalling Your Code | news.ycombinator.com | 2024-08-27

    We're using similar approach in PHP application by facilitating https://github.com/spaze/phpstan-disallowed-calls

    In essence we have defined within each domain:

  • phpstan-dba

    PHPStan based SQL static analysis and type inference for the database access layer

  • phpstan-drupal

    Extension for PHPStan to allow analysis of Drupal code.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

PHP Static Analysis discussion

Log in or Post with

PHP Static Analysis related posts

  • Build a Symfony 7 boilerplate using FrankenPHP, Docker, PostgreSQL and php 8.4

    11 projects | dev.to | 23 Dec 2024
  • Showcasing PHP-Parser: A Native PHP Parser Written in PHP

    1 project | news.ycombinator.com | 29 Sep 2024
  • PHP Is the Best Choice for Long‑Term Business

    1 project | news.ycombinator.com | 3 Sep 2024
  • PHP-Parser: A Native PHP Parser for Parsing and Analyzing PHP Code

    3 projects | news.ycombinator.com | 24 Aug 2024
  • Automate Your PHP Code Formatting with PHP-CS-Fixer

    1 project | news.ycombinator.com | 15 Aug 2024
  • PHPCompatibility: Ensure Your Code Is Future-Proof with PHP_CodeSniffer

    1 project | news.ycombinator.com | 15 Aug 2024
  • Why is unserializing an object in PHP a bad idea?

    2 projects | dev.to | 18 Jul 2024
  • A note from our sponsor - SaaSHub
    www.saashub.com | 15 Jan 2025
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source Static Analysis projects in PHP? This list will help you:

Project Stars
1 PHP Parser 17,119
2 PHPStan 13,126
3 PHP CS Fixer 12,959
4 Psalm 5,595
5 phan 5,544
6 Deptrac 2,688
7 PHP Mess Detector 2,349
8 PHPCompatibility 2,204
9 php-language-server 1,155
10 PHP Architecture Tester 1,128
11 PHP Code Sniffer 1,039
12 enlightn 922
13 phpstan-strict-rules 616
14 BackwardCompatibilityCheck 575
15 phpmnd 562
16 unused-scanner 429
17 phpstan-deprecation-rules 385
18 Exakat 379
19 psalm-plugin-laravel 310
20 phpstan-wordpress 277
21 phpstan-disallowed-calls 266
22 phpstan-dba 265
23 phpstan-drupal 200

Sponsored
Cloudways' Black Friday Offer - 1st Choice of Developers
Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.
platform.cloudways.com

Did you konow that PHP is
the 14th most popular programming language
based on number of metions?