PHPackages                             rector/rector-src - 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. [Database &amp; ORM](/categories/database)
4. /
5. rector/rector-src

ActiveLibrary[Database &amp; ORM](/categories/database)

rector/rector-src
=================

Instant Upgrade and Automated Refactoring of any PHP code

2.5.2(1w ago)136406.3k↑44.3%440[3 PRs](https://github.com/rectorphp/rector-src/pulls)12MITPHPPHP ^8.3CI passing

Since Nov 4Pushed 5d ago4 watchersCompare

[ Source](https://github.com/rectorphp/rector-src)[ Packagist](https://packagist.org/packages/rector/rector-src)[ Docs](https://getrector.com)[ GitHub Sponsors](https://github.com/tomasvotruba)[ RSS](/packages/rector-rector-src/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (234)Versions (605)Used By (12)

Rector - Instant Upgrades and Automated Refactoring
===================================================

[](#rector---instant-upgrades-and-automated-refactoring)

[![Downloads](https://camo.githubusercontent.com/4dae4724af89e8ef23acd9bba790fbf18d2ae11f2c82c8ee0191ee94b8d5ba79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726563746f722f726563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rector/rector)

This repository (`rectorphp/rector-src`) is for development Rector only. Head to [`rectorphp/rector`](http://github.com/rectorphp/rector) for documentation, install or [creating an issue](https://github.com/rectorphp/rector/issues/new).

Building `rectorphp/rector`
---------------------------

[](#building-rectorphprector)

Code of this repository requires PHP 8.3. For `rector/rector` package the builder downgrades code to PHP 7.4+.

How to Contribute
-----------------

[](#how-to-contribute)

Please read [contributing guideline](/CONTRIBUTING.md) for how to contribute to rector.

Debug Tests
-----------

[](#debug-tests)

Do you need to measure speed of particular test? Or just check which test fixture is failing? Make use of pretty print:

```
 vendor/bin/phpunit -d --enable-pretty-print
```

Code of Conduct
---------------

[](#code-of-conduct)

This project adheres to a [Contributor Code of Conduct](/CODE_OF_CONDUCT.md) By participating in this project and its community, you are expected to uphold this code.

Rector Packages CI Status
-------------------------

[](#rector-packages-ci-status)

**Symfony** -

- [![](https://github.com/rectorphp/rector-symfony/actions/workflows/tests.yaml/badge.svg)](https://github.com/rectorphp/rector-symfony/actions/workflows/tests.yaml/badge.svg)[![](https://github.com/rectorphp/rector-symfony/actions/workflows/code_analysis.yaml/badge.svg)](https://github.com/rectorphp/rector-symfony/actions/workflows/code_analysis.yaml/badge.svg)

**PHPUnit** -

- [![](https://github.com/rectorphp/rector-phpunit/actions/workflows/tests.yaml/badge.svg)](https://github.com/rectorphp/rector-phpunit/actions/workflows/tests.yaml/badge.svg)[![](https://github.com/rectorphp/rector-phpunit/actions/workflows/code_analysis.yaml/badge.svg)](https://github.com/rectorphp/rector-phpunit/actions/workflows/code_analysis.yaml/badge.svg)

**Doctrine** -

- [![](https://github.com/rectorphp/rector-doctrine/actions/workflows/tests.yaml/badge.svg)](https://github.com/rectorphp/rector-doctrine/actions/workflows/tests.yaml/badge.svg)[![](https://github.com/rectorphp/rector-doctrine/actions/workflows/code_analysis.yaml/badge.svg)](https://github.com/rectorphp/rector-doctrine/actions/workflows/code_analysis.yaml/badge.svg)

**Downgrade PHP** -

- [![](https://github.com/rectorphp/rector-downgrade-php/actions/workflows/tests.yaml/badge.svg)](https://github.com/rectorphp/rector-downgrade-php/actions/workflows/tests.yaml/badge.svg)[![](https://github.com/rectorphp/rector-downgrade-php/actions/workflows/code_analysis.yaml/badge.svg)](https://github.com/rectorphp/rector-downgrade-php/actions/workflows/code_analysis.yaml/badge.svg)

###  Health Score

77

—

ExcellentBetter than 100% of packages

Maintenance99

Actively maintained with recent releases

Popularity56

Moderate usage in the ecosystem

Community43

Growing community involvement

Maturity98

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 67.6% 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 ~6 days

Total

533

Last Release

12d ago

Major Versions

0.19.8 → 1.0.02024-02-06

1.2.10 → 2.0.0-rc12024-11-27

PHP version history (10 changes)v0.1.0PHP ^7.1

v0.6.0PHP ^7.2

v0.7.3PHP ^7.2.3

v0.7.6PHP ^7.2.4

v0.8.1PHP ^7.2.4|^8.0

0.9.0PHP ^7.3|^8.0

0.11.0PHP ^8.0

0.12.6PHP ^8.1

0.19.0PHP ^8.2

2.3.2PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/924196?v=4)[Tomas Votruba](/maintainers/TomasVotruba)[@TomasVotruba](https://github.com/TomasVotruba)

![](https://www.gravatar.com/avatar/19076b7688ca1c8ee79ab3ac6fa6acdd7b96012973aba3b1a06cbb3154d7f3e5?d=identicon)[samsonasik](/maintainers/samsonasik)

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (12497 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (4365 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (279 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (262 commits)")[![kodiakhq[bot]](https://avatars.githubusercontent.com/in/29196?v=4)](https://github.com/kodiakhq[bot] "kodiakhq[bot] (157 commits)")[![gnutix](https://avatars.githubusercontent.com/u/310134?v=4)](https://github.com/gnutix "gnutix (84 commits)")[![JanMikes](https://avatars.githubusercontent.com/u/3995003?v=4)](https://github.com/JanMikes "JanMikes (79 commits)")[![jeroensmit](https://avatars.githubusercontent.com/u/1814884?v=4)](https://github.com/jeroensmit "jeroensmit (72 commits)")[![dobryy](https://avatars.githubusercontent.com/u/679007?v=4)](https://github.com/dobryy "dobryy (61 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (60 commits)")[![mssimi](https://avatars.githubusercontent.com/u/16163762?v=4)](https://github.com/mssimi "mssimi (57 commits)")[![leoloso](https://avatars.githubusercontent.com/u/1981996?v=4)](https://github.com/leoloso "leoloso (47 commits)")[![Aerendir](https://avatars.githubusercontent.com/u/1968622?v=4)](https://github.com/Aerendir "Aerendir (45 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (37 commits)")[![sabbelasichon](https://avatars.githubusercontent.com/u/13050560?v=4)](https://github.com/sabbelasichon "sabbelasichon (36 commits)")[![carlos-granados](https://avatars.githubusercontent.com/u/1383106?v=4)](https://github.com/carlos-granados "carlos-granados (32 commits)")[![calebdw](https://avatars.githubusercontent.com/u/4176520?v=4)](https://github.com/calebdw "calebdw (31 commits)")[![zingimmick](https://avatars.githubusercontent.com/u/26657141?v=4)](https://github.com/zingimmick "zingimmick (26 commits)")[![keulinho](https://avatars.githubusercontent.com/u/15930605?v=4)](https://github.com/keulinho "keulinho (26 commits)")[![yguedidi](https://avatars.githubusercontent.com/u/1480128?v=4)](https://github.com/yguedidi "yguedidi (26 commits)")

---

Tags

astinstant-upgradesphprectorautomationmigrationrefactoring

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/rector-rector-src/health.svg)

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

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.4k](/packages/infection-infection)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2603.2M436](/packages/ssch-typo3-rector)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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