サンプル
Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator fallback
sha256:88d8938e27249c2df2f15d1afe270f121cee4f79cc76d02c549073e3d1da20cb
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator fallback HOW
- パッケージ
- brick/math 0.19.1
- 環境
- php
- 作成日
- 2026-08-16T08:33:32Z
コントラクト
- assert CalculatorRegistry auto-detects available arithmetic backend without manual configuration
- assert explicit CalculatorRegistry::set with NativeCalculator forces pure-PHP calculation engine
- assert NativeCalculator executes arbitrary-precision addition, multiplication, and division without C extensions
- assert BigDecimal delegates mathematical operations through active CalculatorRegistry backend
- assert explicit configuration of missing GMP backend throws fatal engine Error instead of MathException on calculation
- assert CalculatorRegistry::set with null restores automatic environment backend detection
ファイル
- NOTES.md
- composer.json
- composer.lock
- csx.json
- src/CalculatorConfig.php
- test/contract.php
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9