Replace the old class strings 'Illuminate\Foundation\Providers\ArtisanServiceProvider', with the new class constants Illuminate\Foundation\Providers\ArtisanServiceProvider::class, with following steps:
- Open an editor with a Regex search and replace function
- Search for
'((?:Illuminate|App)\\.+)', - Replace it with
$1::class,
Be careful with that in files with namespaces. It most likely will break your code.
If you have namespace App\Console and a lot class strings like:
'App\Console\Command1',
'App\Console\Command2',
'App\Console\Command3',
You can use following search term:
'(?:Illuminate|App\\Console\\)(.+)',
with the normal replace term:
$1::class,
This will result in:
'Command1::class',
'Command2::class',
'Command3::class',