PHP Code Sniffer
PHPCompatibility
Our great sponsors
PHP Code Sniffer | PHPCompatibility | |
---|---|---|
47 | 19 | |
10,603 | 2,121 | |
0.3% | 1.2% | |
6.8 | 9.0 | |
28 days ago | 5 days ago | |
PHP | PHP | |
BSD 3-clause "New" or "Revised" License | GNU Lesser General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
PHP Code Sniffer
- The Future of PHP_CodeSniffer
-
Laravel code-quality tools
PHP Insights supports sniffs from PHP CodeSniffer and fixers from PHP CS Fixer. This allows you to add any sniff or fixer as long as it implements PHP_CodeSniffer\Sniffs\Sniff or PhpCsFixer\Fixer\FixerInterface.
-
PHP_CodeSniffer update (package name will NOT be changing... just the repo & ownership)
I don’t know why but that link keeps reloading the page over and over. This one works for me: https://github.com/squizlabs/PHP_CodeSniffer/issues/3932
- The Future of PHP CodeSniffer
-
Top 6 PHP code quality tools 2023
PHP_CodeSniffer is a widely-used tool for enforcing coding standards in PHP. It checks the code against a set of predefined coding standards (such as PSR-12, PSR-2, and many others) and provides reports with violations and recommendations for improvement. Documentation: You can find more information about PHP_CodeSniffer and its usage in the official documentation: PHP_CodeSniffer Repository
-
PHP in 2023 - stitcher.io
While you're at it, also include code-style checkers like phpcs, phpmd and/or php-cs-fixer
-
how can I know if I am following PSR standards
See https://github.com/squizlabs/PHP_CodeSniffer
-
change versions
If you are well-versed in programming then you might wanna take a look at PHPCompatibility. It will scan your codebase at different PHP version rulesets to point out code that needs upgrading. You will be needing PHPCS for this.
-
Your experience switching from vanilla PHP spaghetti/OOP to Symfony?
PHP code sniffer
PHPCompatibility
- Update php?
-
What automated tools are there for upgrading old PHP code to the latest PHP versions?
Code Sniffer Compatibility
-
Tools to analyse version-specific PHP code?
Check https://github.com/PHPCompatibility/PHPCompatibility It's list of PHPCodeSniffer sniffs that can be configured to check for version compatibility.
-
Weekly help thread
Use PHP compatibility checker
- What simple tools are available to check which modules in a Drupal 7 installation need to be upgraded to PHP 8 compatible code?
-
Php 8.1 on windows all xml functions stopped worked as undefined ?
The PHPCompatibility ruleset for CodeSniffer may help you find the problem: (Note: This ruleset is incomplete and won't find all compatibility problems)
-
change versions
If you are well-versed in programming then you might wanna take a look at PHPCompatibility. It will scan your codebase at different PHP version rulesets to point out code that needs upgrading. You will be needing PHPCS for this.
-
Tool to assist with PHP migration (Rector?)
I would use either PHPStan or PHP CodeSniffer + PHPCompatibility
-
PHP8 is pushing me over the edge ...
Another helpful tool is PHP_CodeSniffer with the PHP Compatibility Coding Standard-ruleset.
-
Upgrading existing code
PHP-Compatibility CodeSniffer ruleset
What are some alternatives?
PHP CS Fixer - A tool to automatically fix PHP Coding Standards issues
Rector - Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
PHPStan - PHP Static Analysis Tool - discover bugs in your code without running it!
Psalm - A static analysis tool for finding errors in PHP applications
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.
phan - Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
can-i-php - caniuse.com but for PHP - a searchable list of new and deprecated features in recent PHP versions
GrumPHP - A PHP code-quality tool
php7mar - PHP 7 Migration Assistant Report (MAR)