Rector
PHPCompatibility
Our great sponsors
Rector | PHPCompatibility | |
---|---|---|
112 | 19 | |
8,138 | 2,106 | |
3.4% | 1.2% | |
9.9 | 9.0 | |
6 days ago | 9 days ago | |
PHP | PHP | |
MIT 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.
Rector
-
Rector keeps your PHP code base fresh and perfect
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.
-
Starting with Rector PHP: Improving Your PHP Code with Automation
If you want to explore more the rules, you can take a look at this page: https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md
Website: https://getrector.com/
-
Materials/Topics for Senior dev new to PHP
Yep... Rector
-
Avoiding empty() in PHP
rector/rector
-
7.4 to 8.x upgrade help
https://github.com/rectorphp/rector might be useful.
-
Is it too painful to go from 5.2 to 8.2?
You could give rector a try
- Where to start on upgrading a legacy PHP 5.6 “Laravel” project?
-
Upgrade your project to PHP 8.2 with Rector
Rector is a free and open-source tool written in PHP allowing you to automate various refactoring tasks. It analyses your code and applies whatever rules you've specified in its configuration. It is also possible to create your own rules.
-
What automated tools are there for upgrading old PHP code to the latest PHP versions?
Rector is pretty much the only tool I use anymore.
PHPCompatibility
-
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.
-
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
-
Can I PHP? - caniuse.com but for PHP features
PHP CodeSniffer's compatibility stuff: https://github.com/PHPCompatibility/PHPCompatibility
-
How to efficiently update code from PHP5 to PHP8.1?
You may want to look into the PHPCompatibilty ruleset for PHP_CodeSniffer to generate a report of what's obviously broken/deprecated programmatically as well.
-
Let's say you get an old, PHP5, mysql_*, horrible codebase, riddled with security issues and no composer. Your task is to make it work on PHP7+.
also, PHPCompatibility https://github.com/PHPCompatibility/PHPCompatibility is a phpcs ruleset to detect deprecated/removed stuff.
What are some alternatives?
PHP CS Fixer - A tool to automatically fix PHP Coding Standards issues
PHPStan - PHP Static Analysis Tool - discover bugs in your code without running it!
Phpactor - Mainly a PHP Language Server with more features than you can shake a stick at
PHP Code Sniffer - PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
Psalm - A static analysis tool for finding errors in PHP applications
rector-laravel - Rector upgrades rules for Laravel
GrumPHP - A PHP code-quality tool
phan - Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
phpqa - Docker image that provides static analysis tools for PHP
Saleor - Saleor Core: the high performance, composable, headless commerce API.
setup-php - GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.