Files
Investidor-V2/outputs/investmoz-audit-current-20261012/option-B4-condition-read.php
T
nala ba1c0340ea
tests / ci (push) Canceled after 0s
oportunidades 8
2026-10-14 08:25:30 +02:00

13 lines
1.3 KiB
PHP

<?php
ini_set('zend.exception_ignore_args','1');putenv('STABILITY_QA_MODE=consumers');
$b4Root=dirname(__DIR__,2);$app=require $b4Root.'/storage/app/private/investmoz-v2/portal-audit/portal-stability-source-20261011_083742/tools/portal-stability-runtime.php';
$db=Illuminate\Support\Facades\DB::connection();$target=(array)$db->selectOne('SELECT current_database() AS database,inet_server_port() AS port');
if($target!==['database'=>'stability_consumers_20261011_084534_test','port'=>55441])throw new RuntimeException('QA isolation');
$db->beginTransaction();$db->statement('SET TRANSACTION READ ONLY');
try{
$o=App\Models\Opportunity::findOrFail(30);$id='826fa774-2aab-40d7-ab57-80eefc87c748';$c=$o->workflow_context['conditions'][$id];
$p=['target'=>$target,'SQL_read_only'=>true,'state'=>$o->workflow_context['working_state'],'condition_id'=>$id,
'condition'=>array_intersect_key($c,array_flip(['description','gate','status','responsible_user_id','blocking_action','scope','resolution','resolution_history'])),
'active_writes'=>0];$dest=__DIR__.'/option-B4-condition-read.json';if(is_file($dest))throw new RuntimeException('Preserve read');file_put_contents($dest,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();}