Separating Laravel and CakePHP as Community Packages

This feature is available since Rector 0.14.7.

Rector is built for and on the whole PHP community right from the start. But there are also somewhat "local" PHP communities around a specific framework. Each framework has specific needs that are best known to the community member.

That's why we entirely moved Typo3 and Nette Rector extensions to their communities. They know best how to handle rules for the framework.

We want to encourage the community to build their own packages on top of Rector core, so we also decided to move Laravel and CakePHP to the community.

Communities in Control of Their Standards

The significant advantage of community-maintained packages over core ones is that every community has its standards. Those standards are specific to the particular community but not useful for general Rector users. E.g., Laravel uses Blade, a PHP template syntax that can be automated, too.

We want to give these communities the freedom to implement any feature their framework needs. Having these packages in the core, where there are no Laravel and CakePHP developers, only drags those down.

As a side effect, Rector users who do not use particular community packages benefit from this too. Their Rector install load is now smaller and pulls fewer dependencies.

Community Leaders with Strong Vision

Second, the framework communities are driven by their passionate leaders. There is no Symfony without Fabien, no Laravel without Taylor. Leaders need freedom, responsibility, and power to decide where the project should go. Of course, they discuss their opinions with others before making a move, but in the end, it is their decision to move in this or that direction.

That's why the community package should be in the hands of people who use the framework daily. A new framework version brings new features every year. The person who converts them to Rector rules is a passionate developer with a taste for innovation and a bleeding edge.

That's why we decided to separate Laravel and CakePHP from the core and let their active communities take over. They're not part of rector/rector anymore, but they're Rector extensions that you can install standalone.

How to upgrade to the Laravel community Rector package?

Add new package via composer:

composer require driftingly/rector-laravel --dev

Big thanks to Anthony Clark, aka driftingly from Tighten for making this happen promptly and with a smooth swipe 🙏

How to upgrade to the CakePHP community Rector package?

Add new package via composer:

composer require cakephp/upgrade --dev

That's it!

We believe this brings faster iterations of the packages and focuses on a stronger Rector core to support their growth.