@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Vite;
|
||||
|
||||
// Local smoke-test router. Its database target is intentionally fixed to the
|
||||
// disposable PHPUnit database; do not reuse it for development or production.
|
||||
@@ -34,10 +37,10 @@ if ($path !== '/' && is_file($asset)) {
|
||||
|
||||
require_once $root.'/vendor/autoload.php';
|
||||
$app = require $root.'/bootstrap/app.php';
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
// Keep QA on the checked-in build manifest; the developer Vite server may be
|
||||
// stale or backed by a different working copy and is never the QA frontend.
|
||||
Illuminate\Support\Facades\Vite::useHotFile($root.'/storage/framework/investmoz-qa-hot-file');
|
||||
Vite::useHotFile($root.'/storage/framework/investmoz-qa-hot-file');
|
||||
$configuration = $app->make('config');
|
||||
$connectionName = $configuration->get('database.default');
|
||||
$connection = $configuration->get('database.connections.'.$connectionName, []);
|
||||
@@ -61,4 +64,4 @@ if ($identity->database !== 'investmoz_test' || $identity->host !== '127.0.0.1'
|
||||
}
|
||||
|
||||
header('X-Investmoz-QA-Target: '.$identity->database.':'.$identity->port);
|
||||
$app->handleRequest(Illuminate\Http\Request::capture());
|
||||
$app->handleRequest(Request::capture());
|
||||
|
||||
Reference in New Issue
Block a user