@@ -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]);
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user