PHPackages                             neos/rector - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. neos/rector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

neos/rector
===========

71.8k4[14 issues](https://github.com/neos/rector/issues)PHPCI passing

Since Jun 20Pushed 3mo ago7 watchersCompare

[ Source](https://github.com/neos/rector)[ Packagist](https://packagist.org/packages/neos/rector)[ RSS](/packages/neos-rector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Neos.Rector
===========

[](#neosrector)

This package contains a Rector ruleset which is used for migrating from Neos 8.x to 9.0 (and lateron also further up).

Right now we focus especially on rules to migrate from the old Content Repository API (&lt; Neos 9.0) to the Event Sourced Content Repository (&gt;= 9.0).

**PHP-only migrations**

Earlier version of `neos/rector` also did the migration of Yaml and Fusion file. They have been moved into Neos core migrations starting version 9.0.8. Now `neos/rector` only contains PHP migrations.

See for more details: [neos/neos-development-collection#5607](https://github.com/neos/neos-development-collection/issues/5607)

Installation
------------

[](#installation)

Please install the neos/rector package in your Distribution as a dev dependency with composer.
(This has changed to previous versions of this package)

```
# inside your Distribution folder
composer require --dev neos/rector:dev-main
cp Packages/Libraries/neos/rector/rector.template.php rector.php
```

Configuration
-------------

[](#configuration)

Now, open up the `rector.php` file copied above, and adjust the Rector Paths (these are the paths which shall be migrated). By default, all of `./DistributionPackages` will be migrated.

Right now, we ship the following sets of Rector rules:

- `\Neos\Rector\NeosRectorSets::CONTENTREPOSITORY_9_0`: all rules needed to migrate to the Event-Sourced Content Repository

```
$rectorConfig->sets([
    NeosRectorSets::CONTENTREPOSITORY_9_0,
]);

$rectorConfig->paths([
    // TODO: Start adding your paths here, like so:
    __DIR__ . '/DistributionPackages/'
]);
```

Running
-------

[](#running)

Run the following command at the root of your distribution (i.e. where `rector.php` is located).

```
# for trying out what would be done
./bin/rector --dry-run

# for running the migrations
./bin/rector
```

---

Developing Rector Rules for Neos
================================

[](#developing-rector-rules-for-neos)

(This section is not relevant for users, but for **developers** of the Neos Rector packages)

Running Rector after adjusting rules
------------------------------------

[](#running-rector-after-adjusting-rules)

Make sure to run Rector with the `--clear-cache` flag while developing rules, when you run them on a full codebase.

Otherwise, Rector might not re-run for unmodified source files.

Running Tests
-------------

[](#running-tests)

We develop **all** Rector Rules completely test-driven.

The test setup runs completely self contained; does not need *any* Distribution set up.

```
# if inside a Neos Distribution, change to the Package's folder
cd Packages/Libraries/neos/rector

# install PHPunit
composer install

# run PHPUnit
composer tests
```

Generating docs
---------------

[](#generating-docs)

```
composer run generate-docs
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 59.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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11575267?v=4)[Neos](/maintainers/neos)[@neos](https://github.com/neos)

---

Top Contributors

[![dlubitz](https://avatars.githubusercontent.com/u/13046100?v=4)](https://github.com/dlubitz "dlubitz (217 commits)")[![skurfuerst](https://avatars.githubusercontent.com/u/190777?v=4)](https://github.com/skurfuerst "skurfuerst (52 commits)")[![ahaeslich](https://avatars.githubusercontent.com/u/1756367?v=4)](https://github.com/ahaeslich "ahaeslich (32 commits)")[![mhsdesign](https://avatars.githubusercontent.com/u/85400359?v=4)](https://github.com/mhsdesign "mhsdesign (23 commits)")[![robert-heinig](https://avatars.githubusercontent.com/u/15157236?v=4)](https://github.com/robert-heinig "robert-heinig (12 commits)")[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (9 commits)")[![bwaidelich](https://avatars.githubusercontent.com/u/307571?v=4)](https://github.com/bwaidelich "bwaidelich (8 commits)")[![mficzel](https://avatars.githubusercontent.com/u/1309380?v=4)](https://github.com/mficzel "mficzel (5 commits)")[![kitsunet](https://avatars.githubusercontent.com/u/324408?v=4)](https://github.com/kitsunet "kitsunet (3 commits)")[![reflexxion](https://avatars.githubusercontent.com/u/3419968?v=4)](https://github.com/reflexxion "reflexxion (2 commits)")[![saschanowak](https://avatars.githubusercontent.com/u/1643495?v=4)](https://github.com/saschanowak "saschanowak (1 commits)")

### Embed Badge

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

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

###  Alternatives

[hoanganh25991/php-read-ipa

Read basic info about an application from .ipa file.

111.5k](/packages/hoanganh25991-php-read-ipa)

PHPackages © 2026

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