rector-laravel version: ^2.5 (composer.json)
Set: LaravelLevelSetList::UP_TO_LARAVEL_120 (pulls in config/sets/laravel52.php)
The laravel52.php set configures StringToClassConstantRector with:
new StringToClassConstant('auth.login', 'Illuminate\Auth\Events\Login', 'class')
This is intended for legacy Event::listen('auth.login', ...) calls, but the underlying core rule matches any string literal equal to 'auth.login' regardless of call context. Since 'auth.login' is also the conventional Blade view name used by Laravel Breeze/UI's default AuthenticatedSessionController, running this set rewrites:
return view('auth.login');
into:
return view(\Illuminate\Auth\Events\Login::class);
...which breaks the login page (passes an Event class where a view name is expected).
Repro: any fresh Laravel Breeze app + LaravelLevelSetList::UP_TO_LARAVEL_120.
Suggestion: scope this StringToClassConstant mapping to Event::listen/dispatch call arguments only, or drop these legacy 5.0-5.4 string-event mappings from default level sets since they're far more likely to collide with modern Blade view names than to find an actual legacy Event::listen() call.
rector-laravel version: ^2.5 (composer.json)
Set: LaravelLevelSetList::UP_TO_LARAVEL_120 (pulls in config/sets/laravel52.php)
The laravel52.php set configures StringToClassConstantRector with:
new StringToClassConstant('auth.login', 'Illuminate\Auth\Events\Login', 'class')
This is intended for legacy
Event::listen('auth.login', ...)calls, but the underlying core rule matches any string literal equal to 'auth.login' regardless of call context. Since 'auth.login' is also the conventional Blade view name used by Laravel Breeze/UI's default AuthenticatedSessionController, running this set rewrites:into:
...which breaks the login page (passes an Event class where a view name is expected).
Repro: any fresh Laravel Breeze app +
LaravelLevelSetList::UP_TO_LARAVEL_120.Suggestion: scope this StringToClassConstant mapping to Event::listen/dispatch call arguments only, or drop these legacy 5.0-5.4 string-event mappings from default level sets since they're far more likely to collide with modern Blade view names than to find an actual legacy Event::listen() call.