SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 PHP Static Analysis Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
PHP Code Sniffer
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
-
phan
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
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.
-
PHP Architecture Tester
PHP Architecture Tester - Easy to use architectural testing tool for PHP :heavy_check_mark:
-
phpstan-deprecation-rules
PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.
-
phpstan-disallowed-calls
PHPStan rules to detect disallowed method & function calls, constant, namespace, attribute & superglobal usages
-
functional
PHP Functional Programming library. Monads, common use functions and generic collections.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
PHP-CS-Fixer automatically fixes PHP coding standard issues, maintaining a clean codebase and adhering to coding standards. It can be integrated into the development workflow to ensure all code complies with defined standards.
As part of the journey to PHP perfection, you should embrace Rector. It's a amazing, free, and open-source tool for migrations, code quality, type coverage, pushing PHPStan to the highest levels, and yes, it can even auto-fix your existing code! It seamlessly integrates into the CI process, making your development workflow smoother than ever.
Besides what others have already advised, you can also get Phan to scan your project. Set the target to 8.1 and let it run its analysis. Check GitHub repo and docs there for more verbose instructions: https://github.com/phan/phan/
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.
Project mention: Microservices aren't the problem. Incompetent people are | news.ycombinator.com | 2023-11-09
PHPMD - 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.
PHP Architecture Tester (as a PHPStan plugin)
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.
It's also not a big risk because if it does fail it will fail every time you just load the class that implements the interface so probably your while site will error. If you do cursory testing of the new version before you deploy it you can find the problem quickly before it becomes a problem. You can also do static analysis checks on your code to make sure its compatible with the libraries you use including when you upgrade them. And library maintainers can run Roave/BackwardCompatibilityCheck/ to make sure they don't accidentally introduce a new interface method without declaring a new major version.
PHP Magic Number Detector: a tool that aims to help you to detect magic numbers in your PHP code.
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.
Project mention: Microservices aren't the problem. Incompetent people are | news.ycombinator.com | 2023-11-09
PHP Static Analysis related posts
- Rector keeps your PHP code base fresh and perfect
- PHP-Parser: A PHP parser written in PHP
- 8 Essential Tools Every PHP Developer Needs
- Laravel code-quality tools
- PHP 8.3
- Microservices aren't the problem. Incompetent people are
- Enforce architecture rules with Deptrac
-
A note from our sponsor - SaaSHub
www.saashub.com | 19 Apr 2024
Index
What are some of the best open-source Static Analysis projects in PHP? This list will help you:
Project | Stars | |
---|---|---|
1 | PHP Parser | 16,826 |
2 | PHP CS Fixer | 12,529 |
3 | PHPStan | 12,526 |
4 | PHP Code Sniffer | 10,600 |
5 | phan | 5,495 |
6 | Psalm | 5,428 |
7 | Deptrac | 2,551 |
8 | PHP Mess Detector | 2,286 |
9 | PHPCompatibility | 2,116 |
10 | php-language-server | 1,140 |
11 | PHP Architecture Tester | 996 |
12 | enlightn | 859 |
13 | BackwardCompatibilityCheck | 558 |
14 | phpstan-strict-rules | 556 |
15 | phpmnd | 543 |
16 | unused-scanner | 432 |
17 | Exakat | 375 |
18 | phpstan-deprecation-rules | 351 |
19 | psalm-plugin-laravel | 284 |
20 | phpstan-wordpress | 245 |
21 | phpstan-dba | 244 |
22 | phpstan-disallowed-calls | 207 |
23 | functional | 186 |