Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ use RectorLaravel\Set\LaravelLevelSetList;

return RectorConfig::configure()
->withSets([
LaravelLevelSetList::UP_TO_LARAVEL_110,
LaravelLevelSetList::UP_TO_LARAVEL_130,
]);
```

The sets in `RectorLaravel\Set\LaravelSetList` only contain changes related to a specific version upgrade.
For example, the rules in `LaravelSetList::LARAVEL_110` apply when upgrading from Laravel 10 to Laravel 11.
For example, the rules in `LaravelSetList::LARAVEL_130` apply when upgrading from Laravel 12 to Laravel 13.

## Additional Sets

Expand Down
11 changes: 11 additions & 0 deletions config/sets/level/up-to-laravel-130.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use RectorLaravel\Set\LaravelLevelSetList;
use RectorLaravel\Set\LaravelSetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([LaravelSetList::LARAVEL_130, LaravelLevelSetList::UP_TO_LARAVEL_120]);
};
2 changes: 2 additions & 0 deletions src/Set/LaravelLevelSetList.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ final class LaravelLevelSetList
final public const string UP_TO_LARAVEL_110 = __DIR__ . '/../../config/sets/level/up-to-laravel-110.php';

final public const string UP_TO_LARAVEL_120 = __DIR__ . '/../../config/sets/level/up-to-laravel-120.php';

final public const string UP_TO_LARAVEL_130 = __DIR__ . '/../../config/sets/level/up-to-laravel-130.php';
}
1 change: 1 addition & 0 deletions src/Set/LaravelSetProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ final class LaravelSetProvider implements SetProviderInterface
* @var string[]
*/
private const array LARAVEL_POST_FIVE = [
LaravelSetList::LARAVEL_130,
LaravelSetList::LARAVEL_120,
LaravelSetList::LARAVEL_110,
LaravelSetList::LARAVEL_100,
Expand Down
1 change: 1 addition & 0 deletions tests/Sets/LaravelSetProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
final class LaravelSetProviderTest extends TestCase
{
private const array LARAVEL_VERSION_SETS = [
LaravelSetList::LARAVEL_130,
LaravelSetList::LARAVEL_120,
LaravelSetList::LARAVEL_110,
LaravelSetList::LARAVEL_100,
Expand Down
Loading