PHPackages                             wwwision/umadb-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. wwwision/umadb-php

ActivePhp-ext[Database &amp; ORM](/categories/database)

wwwision/umadb-php
==================

PHP bindings for UmaDB event store with Rust FFI

0.3.0(1mo ago)126MITPHPPHP ^8.4CI passing

Since Nov 24Pushed 1mo agoCompare

[ Source](https://github.com/bwaidelich/umadb-php)[ Packagist](https://packagist.org/packages/wwwision/umadb-php)[ GitHub Sponsors](https://github.com/sponsors/bwaidelich)[ Fund](https://www.paypal.me/bwaidelich)[ RSS](/packages/wwwision-umadb-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (23)Used By (0)

UmaDB PHP Extension
===================

[](#umadb-php-extension)

PHP bindings for [UmaDB](https://github.com/umadb-io/umadb) event store, built with Rust using [ext-php-rs](https://github.com/davidcole1340/ext-php-rs).

UmaDB is a specialist event store for **Dynamic Consistency Boundaries (DCB)**, enabling flexible, query-driven append conditions for implementing business rules without hardcoded aggregate boundaries.

Note

See [wwwision/dcb-eventstore-umadb](https://github.com/bwaidelich/dcb-eventstore-umadb) for a more convenient and typesafe API

Features
--------

[](#features)

- ✨ **Full DCB API** - Complete implementation of the Dynamic Consistency Boundaries specification
- 🚀 **High Performance** - Rust-powered with zero-copy data handling
- 🔒 **Type Safe** - Leverages PHP 8.0+ type system
- 💪 **Sync Client** - Blocking operations suitable for traditional PHP applications
- 🎯 **Simple API** - Read, append, head operations with intuitive builder patterns
- 🔄 **Idempotent Appends** - UUID-based event deduplication
- 🏷️ **Tag-based Filtering** - Efficient event queries
- ⚡ **Optimistic Concurrency** - Position-based conflict detection
- 🧵 **Thread Safe (ZTS)** - Full support for FrankenPHP and multi-threaded environments

Requirements
------------

[](#requirements)

- **PHP** 8.4 or higher
- **UmaDB Server** running and accessible
- **Rust** 1.70 or higher (only for building from source)

Installation
------------

[](#installation)

### Option 1: PIE (Recommended)

[](#option-1-pie-recommended)

**Note:** Requires Rust 1.70+ and PIE installed. See [PIE.md](PIE.md) for details.

```
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install PIE
wget https://github.com/php/pie/releases/latest/download/pie.phar
chmod +x pie.phar && sudo mv pie.phar /usr/local/bin/pie

# Install extension
pie install wwwision/umadb-php
```

### Option 2: Pre-built Binaries

[](#option-2-pre-built-binaries)

Download the pre-compiled extension for your platform from the [latest release](https://github.com/bwaidelich/umadb-php/releases/latest):

**Linux (x86\_64):**

```
wget https://github.com/bwaidelich/umadb-php/releases/latest/download/umadb-linux-x86_64.so
sudo cp umadb-linux-x86_64.so $(php-config --extension-dir)/umadb.so
```

**macOS (Intel):**

```
wget https://github.com/bwaidelich/umadb-php/releases/latest/download/umadb-macos-x86_64.dylib
sudo cp umadb-macos-x86_64.dylib $(php-config --extension-dir)/umadb.so
```

**macOS (Apple Silicon):**

```
wget https://github.com/bwaidelich/umadb-php/releases/latest/download/umadb-macos-arm64.dylib
sudo cp umadb-macos-arm64.dylib $(php-config --extension-dir)/umadb.so
```

**Verify checksum (optional but recommended):**

```
# Download checksum file
wget https://github.com/bwaidelich/umadb-php/releases/latest/download/umadb-linux-x86_64.so.sha256

# Verify (Linux/macOS)
shasum -a 256 -c umadb-linux-x86_64.so.sha256
```

### Option 3: Building from Source

[](#option-3-building-from-source)

```
# Clone the repository
git clone https://github.com/bwaidelich/umadb-php.git
cd umadb-php

# Build the extension
./build.sh

# Or use Make
make build

# Install to PHP extension directory
sudo make install
```

See [INSTALL.md](INSTALL.md) for detailed instructions.

### Enable the Extension

[](#enable-the-extension)

After installation (any option), add to your `php.ini`:

```
extension=umadb.so
```

Or for CLI only, use:

```
php -d extension=umadb.so your-script.php
```

Verify installation:

```
php -m | grep umadb
```

Quick Start
-----------

[](#quick-start)

```
