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

This commit is contained in:
2026-11-30 23:04:25 +02:00
parent 318b62f458
commit c9bd6db90b
39 changed files with 2235 additions and 42 deletions
@@ -7,4 +7,14 @@ foreach (['RequisitionPort', 'RequisitionFailure', 'InternalRequisitions'] as $c
foreach (['Schema', 'Port', 'Controller'] as $class) {
require_once __DIR__.'/'.$class.'.php';
}
config(['purchasing-internal.candidate_enabled' => true]);
(static function (): void {
$file = dirname(__DIR__, 3).'/manifest.json';
$format = is_file($file) ? (json_decode(file_get_contents($file), true, 32, JSON_THROW_ON_ERROR)['format'] ?? null) : 'tempo.operational-review.v1';
if (! in_array($format, ['tempo.operational-review.v1', 'tempo.operational-review.v2'], true)) {
throw new RuntimeException('Composição de requisições desconhecida.');
}
// Preserve the historical v1 bootstrap. A v2 code delivery never enables a capability.
if ($format === 'tempo.operational-review.v1') {
config(['purchasing-internal.candidate_enabled' => true]);
}
})();