PHPackages                             rector/rector-generator - 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. [CLI &amp; Console](/categories/cli)
4. /
5. rector/rector-generator

AbandonedRector-extension[CLI &amp; Console](/categories/cli)

rector/rector-generator
=======================

Generate Rector rules from command line

0.7.12(1y ago)101.0M↓47.4%62MITPHPPHP &gt;=8.2

Since Mar 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/deprecated-packages/rector-generator)[ Packagist](https://packagist.org/packages/rector/rector-generator)[ Docs](https://getrector.com)[ GitHub Sponsors](https://github.com/tomasvotruba)[ RSS](/packages/rector-rector-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (18)Versions (52)Used By (2)

\[Deprecated\] Rector Generator
===============================

[](#deprecated-rector-generator)

**Note: We've had this custom package for creating Rector rules from simple file for years.**

**Yet in recent times, we practically never used it and only copy-paste old rule to new one :) package has no value, time to let go.**

---

Every Rector rule requires test, test fixtures, config and the rule.

```
- rules/Package/Rector/Category/SomeRector.php

- rules-tests/Package/Rector/Category/SomeRector/SomeRectorTest.php
- rules-tests/Package/Rector/Category/SomeRector/config/confured_rule.php
- rules-tests/Package/Rector/Category/SomeRector/Fixture/some_fixture.php.inc
```

~80 % of the code is repeated text - namespace, Rector name, default test setup etc.

This package will **save your typing the repeated code** and gives you **more space for writing `refactor()` method logic**.

How to Generate a new Rule?
---------------------------

[](#how-to-generate-a-new-rule)

1. Initialize `rector-recipe.php` config

```
vendor/bin/rector init-recipe
```

2. Complete parameters in `rector-recipe.php` to design your new rule
3. Run command

```
vendor/bin/rector generate
```

That's it :)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 96.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 ~24 days

Recently: every ~36 days

Total

50

Last Release

700d ago

PHP version history (4 changes)0.1.0PHP &gt;=7.3

0.2.0PHP &gt;=8.0

0.4.6PHP &gt;=8.1

0.7.7PHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (196 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (3 commits)")[![wernerkrauss](https://avatars.githubusercontent.com/u/1043925?v=4)](https://github.com/wernerkrauss "wernerkrauss (2 commits)")[![sabbelasichon](https://avatars.githubusercontent.com/u/13050560?v=4)](https://github.com/sabbelasichon "sabbelasichon (1 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[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.2k26.2M1.8k](/packages/infection-infection)[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)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

134391.5k12](/packages/rector-rector-src)[humbug/php-scoper

Prefixes all PHP namespaces in a file or directory.

7963.0M35](/packages/humbug-php-scoper)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

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

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)

PHPackages © 2026

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