Skip to content

$ cat your-composerjson-already-knows-which-rules-to-run.md

Your composer.json Already Knows Which Rules to Run

Learn how Rector can read the framework version already declared in composer.json and automatically pick the matching upgrade rules, ending the manual guessing of which sets to add for Laravel or Drupal upgrades. The article also explains the mechanics behind composer-based sets.

Rector28 Oct 2026 · 1 min read · summary
Read on getrector.com ↗
You upgrade Laravel or Drupal, open `rector.php`, and start hunting for the right sets to add. Laravel 9 set? 10? 11? Did you remove the old ones? Every upgrade, the same guessing game. What if Rector just read the version you already declared in `composer.json` and picked the rules for you? That is exactly what composer-based sets do. Here is how they work under the hood, and why Laravel and Drupal now ride on the same rails.

source

This is a summary of an article first published by Rector. The full piece is on their site.

Open original