mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
Use the ::class notation
This commit is contained in:
parent
bacda07552
commit
16e37cb370
2
artisan
2
artisan
@ -28,7 +28,7 @@ $app = require_once __DIR__.'/bootstrap/app.php';
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make('Illuminate\Contracts\Console\Kernel');
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
|
||||
$status = $kernel->handle(
|
||||
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||
|
@ -27,18 +27,18 @@ $app = new Illuminate\Foundation\Application(
|
||||
*/
|
||||
|
||||
$app->singleton(
|
||||
'Illuminate\Contracts\Http\Kernel',
|
||||
'App\Http\Kernel'
|
||||
Illuminate\Contracts\Http\Kernel::class,
|
||||
App\Http\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
'Illuminate\Contracts\Console\Kernel',
|
||||
'App\Console\Kernel'
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
App\Console\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
'Illuminate\Contracts\Debug\ExceptionHandler',
|
||||
'App\Exceptions\Handler'
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
App\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define('App\User', function ($faker) {
|
||||
$factory->define(App\User::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->email,
|
||||
|
@ -47,7 +47,7 @@ $app = require_once __DIR__.'/../bootstrap/app.php';
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make('Illuminate\Contracts\Http\Kernel');
|
||||
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
||||
|
||||
$response = $kernel->handle(
|
||||
$request = Illuminate\Http\Request::capture()
|
||||
|
@ -18,7 +18,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
{
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
|
||||
return $app;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user