See available Hyperf rules
This package is a Rector extension developed by the Hyperf community.
Install the package as dependency:
composer require friendsofhyperf/rector --dev
To add a set to your config, use Rector\Hyperf\Set\HyperfSetList
class and pick one of the constants:
use Rector\Hyperf\Set\HyperfSetList;
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
HyperfSetList::HYPERF_31
]);
};
the source directory (e.g. src
) is optional.
vendor/bin/rector process src --dry-run
vendor/bin/rector process src
Rector is a tool that we develop and share for free, so anyone can save hundreds of hours on refactoring. But not everyone has time to understand Rector and AST complexity. You have 2 ways to speed this process up:
- read a book - The Power of Automated Refactoring
- hire our experienced team to improve your codebase
Both ways support us to and improve Rector in sustainable way by learning from practical projects.