selectOne('SELECT current_database() AS database,inet_server_port() AS port'); if($t!==['database'=>'stability_consumers_20261011_084534_test','port'=>55441])throw new RuntimeException('QA isolation required'); $db->beginTransaction();$db->statement('SET TRANSACTION READ ONLY'); try{ $rows=[]; foreach([2,17,21,22,24,25]as$id){ $u=$db->table('users')->where('id',$id)->first(['id','email_verified_at','two_factor_confirmed_at']); $roles=$db->table('portal_role_assignments')->where('user_id',$id)->whereNull('revoked_at')->where('starts_at','<=',now())->where(fn($q)=>$q->whereNull('expires_at')->orWhere('expires_at','>',now()))->pluck('role')->unique()->values()->all(); $rows[]=['QA_user_id'=>$id,'exists'=>$u!==null,'email_verified'=>$u?->email_verified_at!==null,'MFA_confirmed'=>$u?->two_factor_confirmed_at!==null,'existing_profile_roles'=>$roles]; } $p=['at'=>gmdate('c'),'target'=>$t,'SQL_read_only'=>true,'active_reads'=>0,'active_writes'=>0,'QA_data_writes'=>0,'credentials_read_or_changed'=>false,'authentication_tests_repeated'=>false,'actors'=>$rows,'QA2_not_mapped_to_QA27'=>true]; file_put_contents(__DIR__.'/acceptance-396c-qa-account2-read.json',json_encode($p,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR)); echo json_encode($p,JSON_UNESCAPED_UNICODE).PHP_EOL; }finally{$db->rollBack();}