PHPackages                             atournayre/rector-auto-upgrade - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. atournayre/rector-auto-upgrade

ActiveComposer-plugin[DevOps &amp; Deployment](/categories/devops)

atournayre/rector-auto-upgrade
==============================

Composer plugin to auto-upgrade using Rector

0.2.0(9mo ago)58911MITPHPPHP &gt;=8.2.22CI passing

Since Apr 6Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/atournayre/rector-auto-upgrade)[ Packagist](https://packagist.org/packages/atournayre/rector-auto-upgrade)[ RSS](/packages/atournayre-rector-auto-upgrade/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (1)

Rector Auto Upgrade Composer Plugin
===================================

[](#rector-auto-upgrade-composer-plugin)

**Automate code migrations related to dependency version upgrades using Rector.**
This Composer plugin enables package maintainers to provide versioned Rector sets that are automatically executed when packages are updated.

---

✨ Purpose
---------

[](#-purpose)

`rector-auto-upgrade` defines a standard for embedding versioned Rector "sets" into PHP packages, allowing automated code migration when users upgrade dependencies.

Each version of a package can provide a Rector set describing necessary changes (e.g., class renaming, method signature updates, deprecations, etc.).

---

📦 How It Works
--------------

[](#-how-it-works)

- When `composer update` is executed,
- The plugin detects which packages are being updated,
- For each updated package, it looks for a Rector set matching the new version,
- If found, the Rector set is executed to automatically refactor the user's code.

---

🗂️ Expected Package Structure
-----------------------------

[](#️-expected-package-structure)

Each package providing migration support must include the following structure:

```
my-package/
├── rector/
│   └── sets/
│       ├── 2.0.0.php
│       ├── 2.1.0.php

```

- Each file name corresponds to a target version of the package.
- The content of each file must return a standard Rector configuration closure.

---

⚙️ Installation
---------------

[](#️-installation)

```
composer require --dev atournayre/rector-auto-upgrade
```

⚠️ This plugin must only be used in a **development environment**.

---

📋 Requirements
--------------

[](#-requirements)

- PHP &gt;= 8.1
- [Rector](https://github.com/rectorphp/rector) must be installed in the project.
- Composer version 2.0 or higher.
- Packages must include `rector/sets/{version}.php` files for their upgrades.

---

🧪 Example Usage
---------------

[](#-example-usage)

1. A package `my/package` provides a file `rector/sets/2.0.0.php`.
2. The user updates `my/package` from version `1.4.0` to `2.0.0`.
3. The plugin detects this version change, finds the matching Rector set, and runs it.
4. The user’s code is automatically updated to comply with `my/package` version `2.0.0`.

---

❗ Limitations &amp; Recommendations
-----------------------------------

[](#-limitations--recommendations)

- This plugin is intended **only for local**.
- Use version control to review and commit changes after execution.
- Only upgrades to higher versions are currently supported.

---

🤝 Contributing
--------------

[](#-contributing)

Feedback and contributions are welcome.
Feel free to open an issue or submit a pull request.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance56

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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 ~76 days

Total

3

Last Release

291d ago

PHP version history (2 changes)0.0.0PHP ^8.2

0.2.0PHP &gt;=8.2.22

### Community

Maintainers

![](https://www.gravatar.com/avatar/be702ea3d10de6d97d83c32866fc9cfe1830a055e7f8b685c8434ccad40416c1?d=identicon)[atournayre](/maintainers/atournayre)

---

Top Contributors

[![atournayre](https://avatars.githubusercontent.com/u/4262077?v=4)](https://github.com/atournayre "atournayre (29 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/atournayre-rector-auto-upgrade/health.svg)

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

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.3M975](/packages/phpro-grumphp)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[oro/platform

Business Application Platform (BAP)

642140.7k104](/packages/oro-platform)[shopware/deployment-helper

Shopware deployment tools

19365.5k5](/packages/shopware-deployment-helper)[drevops/git-artifact

Package artifact from your codebase in CI and push it to a separate git repo.

2133.8k](/packages/drevops-git-artifact)

PHPackages © 2026

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