Rector migration
Automatic migration of Neos 8.3 packages
To ensure the smoothest possible upgrade path, we offer a migration for Rector.
The Rector migration is applied to your custom packages and rewrites the PHP source code, Fusion and YAML configurations to Neos 9 accordingly.
Manual action required
As not all places can get migrated automatically, the migration will also add "todos" for you, where a manual change is required.
#How to use Rector
#Installation
Install the neos/rector package with composer as dev package.
composer require --dev neos/rector:dev-main
cp Packages/Libraries/neos/rector/rector.template.php rector.php
#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 (currently still in progress)
#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