Files
dpl/scripts/theme-fuc/integration-bootstrap.php
T
hellcat 0501711267 feat(fuc-xb): prepare isolated staging theme and VIP auto upgrades
Port the Fuc 0.12.0 frontend and default-off VIP plugin. Include the previously approved password-reset token revocation. Deploy only to an independent FUC-XB test instance; no production cutover.
2026-11-04 13:44:33 +08:00

24 lines
1.4 KiB
PHP

<?php
// Isolated acceptance environment. Uses the real XB kernel, routes and services.
// Never loads DPL/HN environment or sends external mail, payments or notifications.
require __DIR__.'/../../vendor/autoload.php';
$root=dirname(__DIR__,2);
$dir=$root.'/instances/fuc-acceptance';
if (!is_file($dir.'/.fuc-acceptance')) throw new RuntimeException('Run integration-setup.php first');
$_SERVER['XB_INSTANCE']=$_ENV['XB_INSTANCE']='fuc-acceptance';putenv('XB_INSTANCE=fuc-acceptance');
$app=require $root.'/bootstrap/app.php';
$app->beforeBootstrapping(Illuminate\Foundation\Bootstrap\RegisterProviders::class,function($app)use($dir){
$app['config']->set([
'app.env'=>'testing','app.debug'=>false,'app.url'=>'http://xb.loc',
'database.default'=>'sqlite','database.connections.sqlite.database'=>$dir.'/database/acceptance.sqlite',
'cache.default'=>'file','cache.stores.redis'=>['driver'=>'file','path'=>$dir.'/storage/framework/cache/redis'],
'session.driver'=>'file','queue.default'=>'sync','mail.default'=>'array',
'site.theme'=>'Fuc','site.name'=>'Fuc 验收站','site.admin_only_plan_ids'=>[],
]);
});
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
Illuminate\Support\Facades\Http::preventStrayRequests();
Illuminate\Support\Facades\Queue::fake()->except([App\Jobs\OrderHandleJob::class]);
Illuminate\Support\Facades\Mail::fake();
return $app;