PHPackages                             jcergolj/rector-for-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jcergolj/rector-for-laravel

ActiveLibrary

jcergolj/rector-for-laravel
===========================

Rector rules for Laravel projects

v0.9(1w ago)1137↓100%MITPHP

Since May 27Pushed 4d ago1 watchersCompare

[ Source](https://github.com/jcergolj/rector-for-laravel)[ Packagist](https://packagist.org/packages/jcergolj/rector-for-laravel)[ RSS](/packages/jcergolj-rector-for-laravel/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Laravel Rector Rules
====================

[](#laravel-rector-rules)

A reusable Rector package for Laravel projects, containing custom rules and default configuration to enforce consistent refactoring patterns across multiple projects.

---

Installation
------------

[](#installation)

Install the package in your Laravel project:

```
composer require jcergolj/rector-for-laravel --dev
```

This package also depends on:

- [`rector/rector`](https://github.com/rectorphp/rector)
- [`rector/laravel`](https://github.com/rectorphp/rector-laravel)

These will be pulled in automatically if not already installed.

---

⚙️ Usage Options
----------------

[](#️-usage-options)

You can use the default `rector.php` config file in two ways:

### ✅ Option 1: Publish the Config to Project Root (Laravel Style)

[](#-option-1-publish-the-config-to-project-root-laravel-style)

You can publish the default `rector.php` file to the root of your Laravel project using:

```
php artisan vendor:publish --tag=rector-for-laravel-config
```

This will copy `rector.php` from the package into the root of your Laravel project:

```
./rector.php
```

You can then modify this file to suit your project-specific rules and paths.

---

### 🟡 Option 2: Use the Config Directly from the Package

[](#-option-2-use-the-config-directly-from-the-package)

You can run Rector with the config file located in the package itself:

```
vendor/bin/rector process --config=vendor/jcergolj/rector-for-laravel/config/rector.php
```

This is a good option if you want to keep the default setup with no local modifications.

---

📄 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance99

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~95 days

Total

4

Last Release

11d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/111d8d25ce610ce3d6cb7413529089ce6482e34dfc5a6a8bf04592719a0abe07?d=identicon)[jcergolj](/maintainers/jcergolj)

---

Top Contributors

[![jcergolj](https://avatars.githubusercontent.com/u/6940394?v=4)](https://github.com/jcergolj "jcergolj (8 commits)")

### Embed Badge

![Health badge](/badges/jcergolj-rector-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/jcergolj-rector-for-laravel/health.svg)](https://phpackages.com/packages/jcergolj-rector-for-laravel)
```

###  Alternatives

[oddvalue/laravel-drafts

A simple, drop-in drafts/revisions system for Laravel models

418186.0k1](/packages/oddvalue-laravel-drafts)[dragon-code/codestyler

A tool to automatically fix Coding Style Standards issues by The Dragon Code.

291.8M9](/packages/dragon-code-codestyler)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
