diff --git a/config/sets/laravel100.php b/config/sets/laravel100.php new file mode 100644 index 00000000..2f601d3d --- /dev/null +++ b/config/sets/laravel100.php @@ -0,0 +1,39 @@ +import(__DIR__ . '/../config.php'); + + // https://github.com/laravel/framework/pull/32856/files + $rectorConfig->rule(UnifyModelDatesWithCastsRector::class); + + $rectorConfig + ->ruleWithConfiguration(RenamePropertyRector::class, [ + # https://github.com/laravel/laravel/commit/edcbe6de7c3f17070bf0ccaa2e2b785158ae5ceb + new RenameProperty('App\Http\Kernel', 'routeMiddleware', 'middlewareAliases'), + ]); + + $rectorConfig + ->ruleWithConfiguration(RenameMethodRector::class, [ + // https://github.com/laravel/framework/pull/41136/files + new MethodCallRename('Illuminate\Database\Eloquent\Relations\Relation', 'getBaseQuery', 'toBase'), + // https://github.com/laravel/framework/pull/42591/files + new MethodCallRename('Illuminate\Support\Facades\Bus', 'dispatchNow', 'dispatchSync'), + ]); + + $rectorConfig + ->ruleWithConfiguration(RenameFunctionRector::class, [ + // https://github.com/laravel/framework/pull/42591/files + 'dispatch_now' => 'dispatch_sync', + ]); +}; diff --git a/config/sets/level/up-to-laravel-100.php b/config/sets/level/up-to-laravel-100.php new file mode 100644 index 00000000..3de57cfd --- /dev/null +++ b/config/sets/level/up-to-laravel-100.php @@ -0,0 +1,12 @@ +sets([LaravelSetList::LARAVEL_100, LaravelLevelSetList::UP_TO_LARAVEL_90]); +}; diff --git a/src/Set/LaravelLevelSetList.php b/src/Set/LaravelLevelSetList.php index b9a03b1f..cd85d132 100644 --- a/src/Set/LaravelLevelSetList.php +++ b/src/Set/LaravelLevelSetList.php @@ -67,4 +67,9 @@ final class LaravelLevelSetList implements SetListInterface * @var string */ final public const UP_TO_LARAVEL_90 = __DIR__ . '/../../config/sets/level/up-to-laravel-90.php'; + + /** + * @var string + */ + final public const UP_TO_LARAVEL_100 = __DIR__ . '/../../config/sets/level/up-to-laravel-100.php'; } diff --git a/src/Set/LaravelSetList.php b/src/Set/LaravelSetList.php index 85a80e39..9f7eb477 100644 --- a/src/Set/LaravelSetList.php +++ b/src/Set/LaravelSetList.php @@ -78,6 +78,11 @@ final class LaravelSetList implements SetListInterface */ final public const LARAVEL_90 = __DIR__ . '/../../config/sets/laravel90.php'; + /** + * @var string + */ + final public const LARAVEL_100 = __DIR__ . '/../../config/sets/laravel100.php'; + /** * @var string */