rectorphp/rector

Instant Upgrades and Automated Refactoring of any PHP 5.3+ code

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 3 minutes ago
Added to GitGenius on September 5th, 2026
Created on July 15th, 2017
Open Issues & Pull Requests: 2 (+0)
GitHub issues: Enabled
Number of forks: 744
Total Stargazers: 10,416 (+0)
Total Subscribers: 89 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 0.5 hours
Mean response time: 3.2 days
90th percentile: 27.9 hours
Tracked items: 1,743

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 7% of issues opened in the past year have been closed. Three people close 95% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 15
Closed in 7 days: 15
Avg open age: 2 days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 14
Closed in 7 days: 15
Comments in 7 days: 50
Events in 7 days: 100

Top labels

  • bug (1,234)
  • feature (241)
  • easy pick (34)
  • Stale (21)
  • PHPStan bug (12)
  • Help wanted (9)
  • docs (6)
  • windows (3)

Detailed Description

Rector is an automated refactoring and code upgrade tool for PHP that transforms source code according to configurable rules and rule sets.

The tool solves two interconnected problems: keeping PHP applications current with language versions and framework updates, and maintaining consistent code quality as teams grow. Rector works by parsing PHP code into an abstract syntax tree, applying transformations defined by rules or rule sets, and outputting the refactored result. Users can preview changes with a dry-run mode before committing them, and integrate the tool into CI pipelines for continuous automated refactoring.

Rector suits teams upgrading legacy PHP applications or those wanting to enforce code standards automatically. It handles upgrades across the full PHP version range from 5.3 to 8.5, with dedicated rule sets for major frameworks and projects including Symfony, PHPUnit, and Doctrine. The tool is configured through a rector.php file where developers specify which rules or sets to apply, giving fine-grained control over transformations. Teams should adopt it if they need to modernize codebases without manual effort or want to reduce code review burden by automating style and quality checks.

The project maintains active engagement with the broader PHP ecosystem through community-contributed rule sets for specialized frameworks like Drupal, CakePHP, Laravel, TYPO3, Shopware, and others. Development activity shows sustained investment in expanding rule coverage and documentation, with a published book available explaining both internal mechanics and custom rule creation for users needing domain-specific transformations.