nutgram
Rector
Our great sponsors
nutgram | Rector | |
---|---|---|
2 | 57 | |
137 | 5,279 | |
2.2% | 2.4% | |
9.5 | 9.9 | |
5 days ago | 5 days ago | |
PHP | PHP | |
MIT License | MIT License |
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.
nutgram
Rector
-
Php 7.3 - 7.4+ upgrade strategy
Did you try https://getrector.org/ ? Can auto convert your source code. Can also be added to CI. Can also convert code for PHP version or even for Frameworks.
-
Upgrading a custom site to latest PHP
Use Rector. https://github.com/rectorphp/rector
- Rector - Instant Upgrades and Automated Refactoring
- PHP Code Quality Tools
-
PHP RFC: Deprecate ${} string interpolation
PHP seems to be doing better and better with tooling since the plethora of changes got gradually added.
Due to the introduction of better types support; psalm, phpstan, can statically analyze your PHP code and surface bugs that you might overlook in the past. Of course this is what static typing programmers have been preaching all along, but you don't have to go all in, some gradual typing is enough to get benefits.
Ok, you don't want to use the extra type support that PHP nowadays has, you can still benefit from it. Tools like https://github.com/RectorPHP/Rector help you automate PHP code updates, and changes between framework versions. Even the linked proposal includes a script based around the recent-ish PHP built-in tokenizer (no regex shenanigans), to migrate the code for you.
There's some churn, but generally deprecations are sensible. I'm also active in other language communities and deprecation paces are comparable IMO.
-
Upgrading existing code
Rector should be of help
-
Which inconsistences of PHP annoy you the most?
you should look into using rector for this!
-
Upgrading from 4.4
Try Rector, https://github.com/rectorphp/rector.
-
Automated Framework Migration from FuelPHP to Laravel of 400k+lines Application
I recently created https://github.com/rectorphp/rector/issues/7016 to outline this issue. It focuses primarily on PseudoNamespaceToNamespaceRector but also talks about NormalizeNamespaceByPSR4ComposerAutoloadRector as well. It didn't look like the Rector Demo has a way to include a composer file so I'm not sure how to easily reproduce that.
What are some alternatives?
Phpactor - PHP completion, refactoring, introspection tool and language server.
PHP CS Fixer - A tool to automatically fix PHP Coding Standards issues
PHPCompatibility - PHP Compatibility check for PHP_CodeSniffer
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 Code Sniffer - PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
Saleor - A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and React.
rector-laravel - Rector upgrades rules for Laravel
GrumPHP - A PHP code-quality tool
phpqa - Docker image that provides static analysis tools for PHP
setup-php - GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
PHPGGC - PHPGGC is a library of PHP unserialize() payloads along with a tool to generate them, from command line or programmatically.