Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 2.31 KB

File metadata and controls

52 lines (40 loc) · 2.31 KB

summae — PHP reference implementation

PHP reference implementation of summae: GoBD-compliant double-entry, cash-basis accounting (EÜR), VAT, fixed assets and cost accounting — as an embeddable library. From a user's perspective a Composer package (composer require superheld/summae-core), optionally with the Laravel adapter (composer require superheld/summae-laravel).

The normative source is the conformance suite (testsuite/ at the repo root): every implementation must satisfy all fixtures byte-identically and deterministically.

Documentation

Structure

Path Contents
packages/core/ superheld/summae-core — framework-free accounting core (PHP ≥ 8.3, only dependency: brick/math)
packages/laravel/ superheld/summae-laravel — ServiceProvider, database adapter, migrations
packages/cli/ superheld/summae-cli — CLI, JSON output
runner/ fixture runner for the conformance suite
testsuite/ copy of the conformance fixtures — read-only (maintainer: make sync)
SPEC-FINDINGS.md findings against spec/fixtures (escalation path)

Development

Everything runs in Docker, no local PHP needed:

make build      # build the PHP 8.3 image (once)
make install    # composer install
make check      # PHPStan (level max) + PHPUnit — exactly what CI checks
make sync       # (maintainer) update the testsuite from the internal source
make shell      # shell in the container

Postgres is only needed from JOB-012 on: docker compose --profile db up -d (port 54329, user/DB/password: rechnungswesen).

Iron rules

  1. Fixtures are never edited. Contradiction found → SPEC-FINDINGS.md.
  2. The core stays framework-free. No Illuminate\* in packages/core.
  3. Journal append-only, balances are projections. Never store a balance.
  4. Money is never a float. Money on brick/math, half-up, allocate largest-remainder.
  5. Names come from the glossary (EN column), error codes from the error catalog.