driftingly / rector-laravel by driftingly

Rector upgrades rules for Laravel Framework
5,650,417
810
13
Package Data
Maintainer Username: driftingly
Package Create Date: 2021-03-19
Package Last Update: 2025-05-14
Home Page: http://getrector.org
Language: PHP
License: MIT
Last Refreshed: 2025-06-16 03:03:16
Package Statistics
Total Downloads: 5,650,417
Monthly Downloads: 391,464
Daily Downloads: 3,171
Total Stars: 810
Total Watchers: 13
Total Forks: 73
Total Open Issues: 13

Rector Rules for Laravel

See available Laravel rules

Install

This package is a Rector extension developed by the Laravel community.

Install the RectorLaravel package as dependency:

composer require driftingly/rector-laravel --dev

Use Sets

To add a set to your config, use RectorLaravel\Set\LaravelSetList class and pick one of the constants:

use RectorLaravel\Set\LaravelSetList;
use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->sets([
        LaravelSetList::LARAVEL_90
    ]);
};

Learn Rector Faster

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.