PHPackages                             labofgood/rector-output-to-composer-patches - 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. labofgood/rector-output-to-composer-patches

ActiveLibrary

labofgood/rector-output-to-composer-patches
===========================================

This tool utilizes Rector json output to create composer patches for third-party packages.

v1.0.2(12mo ago)6343↓50%BSD-3-ClausePHPPHP ^8.1

Since Nov 1Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/abramchenkoaa/rector-output-to-composer-patches)[ Packagist](https://packagist.org/packages/labofgood/rector-output-to-composer-patches)[ RSS](/packages/labofgood-rector-output-to-composer-patches/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (0)

Rector output to composer patches
=================================

[](#rector-output-to-composer-patches)

Overview
--------

[](#overview)

When updating to a newer PHP version, you might encounter compatibility issues with third-party dependencies. This tool transforms the output from Rector into composer patches to address these incompatibilities in third-party packages.

Prerequisites
-------------

[](#prerequisites)

- PHP 8.1 or higher
- Composer 2.4.1 or higher

Dependencies
------------

[](#dependencies)

composer.json includes:

```
    "symfony/console": "^v6.3.4"

```

Installation Steps
------------------

[](#installation-steps)

Please follow the instructions:

- Run `composer require --dev labofgood/rector-output-to-composer-patches`
    or
- Run `git clone git@github.com:abramchenkoaa/rector-output-to-composer-patches.git`

Usage Guide
-----------

[](#usage-guide)

- Install Rector and gather the output for a third-party package.

```
composer require rector/rector --dev
php /path/to/project/vendor/bin/rector process /path/to/project/vendor/vendor_name/package_name --dry-run --output-format=json --autoload-file /path/to/project/vendor/autoload.php  > /path/to/project/rector.json
```

- In the case of manual installation, run the following command to generate patches:

```
php bin/rector-to-patch generate:composer-patches --file_path '/path/to/project/rector.json' --ticket ISSUE-123
```

- In the case of composer installation, run the following command to generate patches:

```
php /path/to/project/vendor/bin/rector-to-patch generate:composer-patches --file_path '/path/to/project/rector.json' --ticket ISSUE-123
```

- The patches will be generated in the `/path/to/project/patches` folder by default.
- Check command help for more options:

```
php bin/rector-to-patch generate:composer-patches --help
```

Output:

```
Description:
  Generate composer patches for each file in json output

Usage:
  generate:composer-patches [options]

Options:
      --file_path=FILE_PATH      Path to the file which contains the JSON output
      --ticket[=TICKET]          Identifier of the ticket in Jira or Github ect. [default: "identifier-not-set"]
      --output_dir[=OUTPUT_DIR]  Path to the output directory [default: "/path/to/project/rector-output-to-composer-patches/patches"]

```

Credits
-------

[](#credits)

- Anton Abramchenko

Licensing
---------

[](#licensing)

Copyright © 2023 Anton Abramchenko. All rights reserved.
This software is under the "3-Clause BSD License" license (see source).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance50

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Recently: every ~140 days

Total

6

Last Release

361d ago

Major Versions

v0.1.3 → v1.0.02023-11-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/26646a2ddacab5eb42b247a6b73921c32d5d1b41e624b0faabb1ef4a9974331b?d=identicon)[abramchenkoaa](/maintainers/abramchenkoaa)

---

Top Contributors

[![abramchenkoaa](https://avatars.githubusercontent.com/u/3831358?v=4)](https://github.com/abramchenkoaa "abramchenkoaa (9 commits)")

---

Tags

dev

### Embed Badge

![Health badge](/badges/labofgood-rector-output-to-composer-patches/health.svg)

```
[![Health](https://phpackages.com/badges/labofgood-rector-output-to-composer-patches/health.svg)](https://phpackages.com/packages/labofgood-rector-output-to-composer-patches)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

2.9k6.3M68](/packages/deptrac-deptrac)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91245.3M590](/packages/laravel-pail)[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k21.7M876](/packages/phing-phing)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M263](/packages/ssch-typo3-rector)

PHPackages © 2026

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