Rector upgrades rules for Laravel
1.2k
Stars
109
Forks
29
Open issues
30
Contributors
AI Analysis
Rector Rules for Laravel is a specialized Rector extension that automates code upgrades for Laravel projects by applying version-specific transformation rules. It serves Laravel developers who need to modernize their codebase across major version upgrades and code quality improvements. This tool is specifically for the Laravel ecosystem and is not applicable to general PHP development or non-Laravel projects.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Rector Laravel Rules: Automated code upgrade rules for Laravel framework migrations
rector-laravel provides automated code transformation rules for upgrading Laravel applications across major versions. It extends the Rector project with Laravel-specific refactoring rules, targeting developers and teams automating framework upgrades. The project sits within the Rector ecosystem rather than as a standalone tool, addressing the tedious manual work of updating deprecated APIs and syntax when moving between Laravel versions.
Created March 2021 as a community-driven Rector extension for Laravel. Emerged from recognition that Laravel framework upgrades involve many mechanical, rule-based code changes suitable for automated refactoring. Grew alongside Rector's adoption in the PHP ecosystem and Laravel's regular release cadence.
Steady growth to ~1,242 stars over 5 years, with consistent monthly Packagist downloads (adoption metric visible but not quantified in README). Recent activity shows active maintenance: last push 2026-06-30, 3 stars gained in last 7 days. Growth appears driven by Laravel's predictable version schedule and the increasing adoption of Rector-based upgrade workflows rather than viral adoption curves.
Packagist download badge present but count not extracted from README excerpt. GitHub presence (1,242 stars, 108 forks) and Packagist listing indicate some adoption, but adoption not verified through case studies, testimonials, or documented large-scale deployments in README.
Appears to be a collection of configurable Rector rule sets organized by Laravel version (e.g., LaravelLevelSetList, LaravelSetList). Based on README, supports both automatic version detection via composer.json and manual rule selection. Includes rules for specific first-party packages (Cashier, Livewire). Likely uses Rector's PHP AST parsing infrastructure as foundation.
README shows CI badges for 'Tests' and 'Code Analysis' workflows, indicating automated test execution, but specific coverage percentage or test count not documented in README.
Active maintenance as of 2026-06-30 (6 days ago from evaluation date). Workflow badges suggest regular CI runs. No visible stagnation indicators; last push recency and ongoing rule development suggest active upkeep.
ADOPT IF: your team performs regular Laravel framework upgrades and wants to automate mechanical API/syntax changes, and you are already familiar with Rector or willing to invest in its learning curve. AVOID IF: you require a simple, standalone upgrade tool without dependency on the Rector ecosystem, or if your Laravel codebase has heavy custom conventions outside framework norms. MONITOR IF: you are considering Rector adoption but want to gauge Laravel rule maturity first; track release frequency and documented rule coverage in upcoming Laravel versions.
Independent dimensions
Mainstream potential
3/10
Technical importance
6/10
Adoption evidence
4/10
- Dependency lock: tightly coupled to Rector's API and release schedule; breaking changes in Rector may require corresponding updates to this extension.
- Coverage gaps: not all Laravel upgrade scenarios may be covered by available rules; custom refactoring may still be needed for edge cases or first-party packages beyond those currently supported.
- Learning curve: requires understanding both Rector configuration syntax and Laravel upgrade semantics; not a turnkey solution for developers unfamiliar with either.
- Adoption concentration: if adoption is limited to a subset of Laravel teams, rule quality and edge case handling may not be as battle-tested as Rector's core PHP rules.
- Version lag: rules for new Laravel versions may lag behind framework releases, creating temporary gaps during early adoption periods.
Likely to remain a stable, niche utility within Laravel and Rector ecosystems, growing modestly with each Laravel release cycle. Unlikely to achieve mainstream visibility outside Rector-adopting communities, but will continue to be maintained and extended for Laravel upgrades at predictable intervals.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Website
- http://getrector.org
- Language
- PHP
- License
- MIT
- Last updated
- 3d ago
- Created
- 65mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
LARAVEL_130_WITHOUT_ATTRIBUTES doesnt work
ScopeNamedClassMethodToScopeAttributedClassMethodRector forces `protected`, breaking scopes declared in an interface (Fatal: access level must be public)
`RequestStaticValidateToInjectRector` incorrectly rewrites `FormRequest::failOnUnknownFields()` to `$request->failOnUnknownFields()`
Type hinting rectors not context-aware
RequestStaticValidateToInjectRector should ignore tests
Top contributors
Recent releases
Similar repos
VentureCraft/revisionable
Revisionable is a Laravel package that automatically tracks revision history...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.2k | +5 | PHP | 8/10 | 3d ago |
|
|
10.4k | — | PHP | 8/10 | 5d ago |
|
|
1.6k | — | PHP | 8/10 | 2w ago |
|
|
2.6k | — | PHP | 7/10 | 5mo ago |
|
|
84.7k | — | Blade | 9/10 | 2w ago |
|
|
6.4k | — | PHP | 9/10 | 3w ago |
rector-laravel is an extension built on top of Rector, not a replacement. Rector is the foundational platform; this project provides Laravel-specific rule sets.
Focuses on code inspection and discovery (finding dead code, unused variables). rector-laravel focuses on automated refactoring and upgrades. Different use cases within Laravel developer workflows.
Competes with custom shell scripts or ad-hoc Laravel upgrade guides. Provides standardized, version-aware rule sets instead of per-project custom logic.