I'm currently upgrading a project using Rector and I'm in trouble with composer based configurations.
My project is in Laravel 11, I want to upgrade to Laravel 12.
In my composer.json, Laravel 12 is required.
If I run rector with this config, no file is changed :
->withPaths([
__DIR__ . '/app',
__DIR__ . '/bootstrap',
__DIR__ . '/config',
__DIR__ . '/public',
__DIR__ . '/resources',
__DIR__ . '/routes',
__DIR__ . '/tests',
])
->withSetProviders(LaravelSetProvider::class)
->withComposerBased(laravel: true);
Then I change my config to :
->withPaths([
__DIR__ . '/app',
__DIR__ . '/bootstrap',
__DIR__ . '/config',
__DIR__ . '/public',
__DIR__ . '/resources',
__DIR__ . '/routes',
__DIR__ . '/tests',
])
->withSets([LaravelLevelSetList::UP_TO_LARAVEL_120]);
And 8 files are changed.
This behavior looks wrong to me, as I'm expecting withComposerBased can detect my Laravel version and apply rules from UP_TO_LARAVEL_120 set list
I'm currently upgrading a project using Rector and I'm in trouble with composer based configurations.
My project is in Laravel 11, I want to upgrade to Laravel 12.
In my composer.json, Laravel 12 is required.
If I run rector with this config, no file is changed :
Then I change my config to :
And 8 files are changed.
This behavior looks wrong to me, as I'm expecting
withComposerBasedcan detect my Laravel version and apply rules fromUP_TO_LARAVEL_120set list