'browser-testing']; $manifest = json_decode(file_get_contents('C:/laragon/data/sgf-tempo/secrets/browser-fixture.json'), true, 64, JSON_THROW_ON_ERROR); } else { $settings = []; } foreach ($settings as $k => $v) { putenv($k.'='.$v); $_ENV[$k] = $_SERVER[$k] = $v; } require $root.'/vendor/autoload.php'; $app = require $root.'/bootstrap/app.php'; $app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap(); $db = \Illuminate\Support\Facades\DB::connection(); $db->beginTransaction(); try { if ($db->getDriverName() === 'pgsql') { $db->statement('SET TRANSACTION READ ONLY'); } $accounts = []; foreach (\App\Models\User::query()->orderBy('id')->get() as $u) { $record = ['id' => $u->id, 'email' => $u->email, 'verified' => (bool) $u->email_verified_at]; if (str_contains($u->email, '@example.test')) { $record['synthetic'] = true; $candidate = null; if (isset($manifest['accounts'])) { foreach ($manifest['accounts'] as $role => $a) { if ($a['email'] === $u->email) { $record['role'] = $role; $candidate = $a['password']; } } } elseif (isset($manifest['password'])) { $candidate = $manifest['password']; } if ($candidate !== null) { $record['stored_demo_credential_matches'] = \Illuminate\Support\Facades\Hash::check($candidate, $u->password); } } if (isset($u->tenant_id)) { $record['tenant_id'] = (int) $u->tenant_id; } $accounts[] = $record; } echo json_encode(['instance' => $mode, 'environment' => app()->environment(), 'database' => $db->getDatabaseName(), 'effective_database' => $db->getDriverName() === 'pgsql' ? $db->selectOne('select current_database() as d')->d : $db->getDatabaseName(), 'session_cookie' => config('session.cookie'), 'session_domain' => config('session.domain'), 'accounts' => $accounts, 'read_only' => true], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_THROW_ON_ERROR).PHP_EOL; } finally { $db->rollBack(); }