Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog

All notable changes to `allgorithm/business-core` will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.0.0] - 2026-09-08

### Added
- **Core Architecture**: Zero-dependency, pure PHP 8.4+ foundation for Domain-Driven Design (DDD).
- **Operation Pipeline**: Deterministic multi-stage pipeline orchestration:
- Context Validation & Actor resolution (`ActorContext`, `OperationContext`).
- Strict Authorization Gate (`AuthorizationStage`, `AuthorizationContract`).
- Pre-condition Guards Evaluation (`GuardStage`, `OperationGuardContract`, `CheckResult`).
- Safe Handler Execution with `\Throwable` safety netting into `OperationStatus::FAILED`.
- Event Dispatching (`EventDispatcherContract`, `DomainEvent`).
- Manipulationssicherer Append-Only Audit Trail (`AuditStage`, `AuditWriterContract`, `AuditEntry`) with built-in PII/sensitive data redaction.
- **Contracts & Value Objects**:
- `CommandContract`, `QueryContract`, `OperationContract`.
- Immutable DTOs (`OperationDescriptor`, `CheckResult`, `CheckResolution`, `AuditEntry`, `OperationResult`).
- **DevOps & Quality Gates**:
- PHPStan Level 8 static analysis integration.
- Pest PHP Architecture Tests (`GatekeeperArchTest`, `CoreArchTest`).
- GitHub Actions CI matrix with automated `composer audit`, PHPStan, and Pest validation.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ Das Paket kommt mit **Zero-Dependencies** auf externe Framework-Fassaden (kein L

## ⚡️ Quickstart

### Installation
### 📦 Installation

Das Paket kann direkt über Composer in Deine (Host-)Applikation installiert werden:

```bash
composer require allgorithm/business-core
```

### Die Operation Pipeline in Action
### 🚀 Die Operation Pipeline in Action

Die Kernkomponente ist die `OperationPipeline`. Sie sorgt dafür, dass jede Operation zwingend autorisiert wird, Guards passiert, Fehler sicher fängt und lückenlos auditiert:

Expand Down Expand Up @@ -59,7 +59,7 @@ if ($result->isSuccess()) {

---

## 🛡️ Public Contracts & Statuswerte
## 🏛️ Public Contracts & Statuswerte

Der Core orchestriert Logik ausschließlich über saubere Interfaces (Contracts). Die wesentlichen Bestandteile:

Expand All @@ -68,7 +68,7 @@ Der Core orchestriert Logik ausschließlich über saubere Interfaces (Contracts)
* **`OperationGuardContract`**: Abgekoppelte Vorbedingungen, die strukturiert als `CheckResult` zurückmelden, ob eine Aktion erlaubt ist.
* **`AuditWriterContract`**: Strikt Append-Only Revisionsprotokoll für alle Ausgänge (`AuditEntry`).

### Abbruchregeln (Pipeline Flow)
### 🚦 Abbruchregeln (Pipeline Flow)

Die Ausführung einer Operation über die `OperationPipeline` folgt deterministischen Regeln:

Expand All @@ -78,7 +78,7 @@ Die Ausführung einer Operation über die `OperationPipeline` folgt deterministi
4. **Exceptions**: Jegliche `\Throwable` in der `handle()`-Logik wird gefangen und strukturiert in ein `FAILED`-Resultat umgewandelt. Niemals crasht der Request unkontrolliert!
5. **Audit First**: Egal welcher Ausgang (Erfolg, Blockiert, Fehler), die `AuditStage` schreibt immer lückenlos einen revisionssicheren `AuditEntry`.

### OperationStatus
### 📊 OperationStatus

Jedes Ergebnis wird einheitlich als `OperationResult` zurückgegeben, welches den definitiven Status trägt:

Expand All @@ -94,8 +94,7 @@ enum OperationStatus: string

---



## 📄 Lizenz & Contributing

Dieses Projekt ist unter der **MIT Lizenz** veröffentlicht. Pull Requests und Feedback sind herzlich willkommen!

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "allgorithm/business-core",
"description": "Domain-neutral foundation for business operations, guards, events and append-only audit.",
"description": "A high-performance, zero-dependency PHP foundation for orchestrating Domain-Driven Design use cases, strict guards, and append-only auditing.",
"type": "library",
"license": "MIT",
"authors": [
Expand Down
Loading