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

This commit is contained in:
2026-11-29 19:49:19 +02:00
parent a935499d64
commit 96b30368bc
96 changed files with 3397 additions and 111 deletions
+8
View File
@@ -260,6 +260,11 @@ final class AgreementOrderLimits
private function loadArithmetic(): void
{
if (app(InventoryConversionRuntime::class)->enabled()) {
app(ReceiptStockMovement::class)->load();
return;
}
$root = base_path('packages/inventory-write/development');
$bytes = file_get_contents($root.'/manifest.json');
if ($bytes === false || ! hash_equals('90cf565537e7fd48eb54a87bcfd6d585cf53239f075764910047838b3b8b4c38', hash('sha256', $bytes))) {
@@ -271,6 +276,9 @@ final class AgreementOrderLimits
if (! is_string($hash) || ! hash_equals($manifest['files']['src/QuantityConversion.php'], $hash)) {
throw new \LogicException('Aritmética alterada.');
}
if (class_exists(QuantityConversion::class, false) && realpath((new \ReflectionClass(QuantityConversion::class))->getFileName() ?: '') !== realpath($file)) {
throw new \LogicException('COMPRAS_INVENTORY_ARITHMETIC_VERSION');
}
require_once $file;
}