Download the PHP package wwwision/umadb-php without Composer

On this page you can find all versions of the php package wwwision/umadb-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package umadb-php

UmaDB PHP Extension

PHP bindings for UmaDB event store, built with Rust using 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 for a more convenient and typesafe API

Features

Requirements

Installation

Option 1: PIE (Recommended)

Note: Requires Rust 1.70+ and PIE installed. See PIE.md for details.

Option 2: Pre-built Binaries

Download the pre-compiled extension for your platform from the latest release:

Linux (x86_64):

macOS (Intel):

macOS (Apple Silicon):

Verify checksum (optional but recommended):

Option 3: Building from Source

See INSTALL.md for detailed instructions.

Enable the Extension

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

Or for CLI only, use:

Verify installation:

Quick Start

API Reference

Client

Constructor

Parameters:

Note on Named Arguments: Parameter names use snake_case (not camelCase). When using named arguments, all preceding optional parameters must be provided explicitly (even as null) due to ext-php-rs limitations.

Examples:

read()

Reads events from the event store.

Parameters:

Returns: Array of SequencedEvent objects

Examples:

append()

Appends events to the event store.

Parameters:

Returns: Position of the last appended event

Throws: IntegrityException if append condition fails

Examples:

head()

Returns the current head position of the event store, or null if empty.

Example:

Event

Represents an event in the event store.

Properties:

Example:

SequencedEvent

Represents an event with its position in the stream.

Properties:

Note: This class is returned by read() and cannot be instantiated directly.

Query

A query for filtering events. An event matches if it matches any query item (OR logic).

Parameters:

Example:

QueryItem

A query item specifying event types and tags to match.

Matching Rules:

Parameters:

Examples:

AppendCondition

Condition for conditional appends, enabling optimistic concurrency control and business rule enforcement.

Parameters:

Examples:

Exception Classes

All exceptions extend PHP's base Exception class and are in the UmaDB\Exception namespace:

Example:

Usage Examples

Idempotent Appends

Use UUIDs to make appends idempotent:

Prevent Duplicate Email Registration

Multi-step Workflow Coordination

Query Filtering

Development

Building

Testing

Running Examples

Start UmaDB server:

Run examples:

Architecture

This extension uses ext-php-rs to create Rust-powered PHP extensions with:

The extension wraps the umadb-client Rust crate, providing a synchronous client that internally manages a Tokio runtime for async gRPC operations.

FrankenPHP & Multi-Threading

The extension fully supports FrankenPHP and other multi-threaded PHP environments:

When compiled against FrankenPHP's ZTS-enabled PHP, the extension automatically uses thread-safe code paths. No special configuration is needed.

Comparison with Python Bindings

Similar to the Python bindings (umadb package), this PHP extension:

Differences:

License

Licensed under the MIT License. See LICENSE-MIT for details.

Contributing

Contributions are welcome! Please ensure:

  1. Code is formatted: make fmt
  2. Clippy passes: make clippy
  3. Tests pass: make test and make test-rust
  4. Examples run successfully

Links


All versions of umadb-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wwwision/umadb-php contains the following files

Loading the files please wait ...