commit compras2 2911
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-29 10:48:22 +02:00
parent 448948a487
commit 7da8d6c87a
64 changed files with 2538 additions and 288 deletions
@@ -0,0 +1,28 @@
<?php
namespace App\Console\Commands;
use App\Services\StandaloneInstallation;
use Illuminate\Console\Command;
final class PrepareStandaloneRuntime extends Command
{
protected $signature = 'compras:runtime:prepare
{--expected-database= : Exact own database name}
{--expected-role= : Exact non-elevated database role}
{--operator= : Named deployment operator}
{--reason= : Recorded installation or recovery reason}
{--apply : Apply the explicitly selected installation}
{--rebind : Preserve restored schema and register a new installation binding}';
protected $description = 'Preparar explicitamente a composição independente; pré-visualizar por defeito';
public function handle(StandaloneInstallation $installation): int
{
$result = $installation->prepare((string) $this->option('expected-database'), (string) $this->option('expected-role'),
(string) $this->option('operator'), (string) $this->option('reason'), $this->option('apply') === true, $this->option('rebind') === true);
$this->line(json_encode($result, JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR));
return self::SUCCESS;
}
}