From 438a415510eb3e762ec21dfe6ea714a6104de6fd Mon Sep 17 00:00:00 2001 From: Caleb White Date: Tue, 12 Aug 2025 23:35:16 -0500 Subject: [PATCH] docs: update docs for version auto-detection --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 24f184a9a..6bbf49cf4 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,22 @@ composer require --dev driftingly/rector-laravel ## Automate Laravel Upgrades -To add a set to your config, use `RectorLaravel\Set\LaravelLevelSetList` and pick the constant that matches your target version. +To automatically apply the correct rules depending on the version of Laravel (or other packages) you are currently on (as detected in the `composer.json`), use the following: + +```php +withSetProviders(LaravelSetProvider::class) + ->withComposerBased(laravel: true, /** other options */); +``` + +### Manual Configuration + +To manually add a version set to your config, use `RectorLaravel\Set\LaravelLevelSetList` and pick the constant that matches your target version. Sets for higher versions include sets for lower versions. ```php