fix: load PluginServiceProvider first

This commit is contained in:
Asnxthaony 2023-05-31 16:47:56 +08:00
parent 77b58de7ef
commit f436c056e0
No known key found for this signature in database
GPG Key ID: 6537C59306464F54
5 changed files with 14 additions and 11 deletions

View File

@ -189,8 +189,8 @@ return [
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\PluginServiceProvider::class,
App\Providers\RouteServiceProvider::class,
App\Providers\ViewServiceProvider::class,
])->toArray(),

View File

@ -29,7 +29,7 @@
"admin-lte": "^3.2.0",
"blessing-skin-shell": "^0.3.4",
"bootstrap": "^4.6.1",
"cac": "^6.6.1",
"cac": "6.6.1",
"cli-spinners": "^2.5.0",
"clsx": "^1.1.1",
"echarts": "^5.1.2",

View File

@ -2,7 +2,8 @@
namespace Tests;
use Artisan;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Support\Facades\Artisan;
use Laravel\BrowserKitTesting\TestCase;
class BrowserKitTestCase extends TestCase
@ -16,7 +17,7 @@ class BrowserKitTestCase extends TestCase
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
$app->make(Kernel::class)->bootstrap();
Artisan::call('migrate:refresh');

View File

@ -2,7 +2,9 @@
namespace Tests;
use Artisan;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Artisan;
class TestCase extends \Illuminate\Foundation\Testing\TestCase
{
@ -11,11 +13,11 @@ class TestCase extends \Illuminate\Foundation\Testing\TestCase
*/
protected $baseUrl = 'http://localhost';
public function createApplication()
public function createApplication(): Application
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
$app->make(Kernel::class)->bootstrap();
Artisan::call('migrate:refresh');

View File

@ -2509,10 +2509,10 @@ bytes@3.1.2:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
cac@^6.6.1:
version "6.7.14"
resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959"
integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==
cac@6.6.1:
version "6.6.1"
resolved "https://registry.yarnpkg.com/cac/-/cac-6.6.1.tgz#3dde3f6943f45d42a56729ea3573c08b3e7b6a6d"
integrity sha512-uhki4T3Ax68hw7Dufi0bATVAF8ayBSwOKUEJHjObPrUN4tlQ8Lf7oljpTje/mArLxYN0D743c2zJt4C1bVTCqg==
cache-base@^1.0.1:
version "1.0.1"