Download the PHP package dbellettini/eventstore-client without Composer
On this page you can find all versions of the php package dbellettini/eventstore-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dbellettini/eventstore-client
More information about dbellettini/eventstore-client
Files in dbellettini/eventstore-client
Package eventstore-client
Short Description KurrentDB client for PHP (core)
License MIT
Informations about the package eventstore-client
KurrentDB PHP Client
A modern PHP client library for KurrentDB (formerly EventStoreDB) HTTP API, designed for event sourcing applications.
Note: This library uses the HTTP API. For TCP integration, see prooph/event-store-client.
Features
- ✅ Support for KurrentDB HTTP API
- ✅ Event stream management (read, write, delete)
- ✅ Optimistic concurrency control
- ✅ Stream iteration (forward and backward)
- ✅ Batch operations for performance
- ✅ Built-in HTTP caching support
- ✅ PSR-7 and PSR-18 compliant
- ✅ Type-safe with PHP 8.4 features
- ✅ Comprehensive error handling
Requirements
- PHP 8.4 or higher
- KurrentDB server (HTTP API enabled)
Installation
Via Composer
Via Metapackage (Recommended)
For the complete package with additional integrations:
Local Development
Quick Start
Basic Setup
Writing Events
Reading Events
Stream Navigation
Optimistic Concurrency Control
Stream Management
Advanced Usage
HTTP Caching
Improve performance with built-in caching:
Batch Operations
Read multiple events efficiently:
Error Handling
Custom HTTP Client
You can provide your own HTTP client implementing HttpClientInterface
:
Development Setup
Quick Start with Make
Testing
The project uses PHPUnit for testing:
API Reference
Main Classes
EventStore
- Main client class for all operationsWritableEvent
- Represents an event to be writtenWritableEventCollection
- Collection of events for atomic writesStreamFeed
- Paginated view of a streamEvent
- Represents a read event with version and metadata
Enums
StreamDeletion
- SOFT or HARD deletion modesEntryEmbedMode
- NONE, RICH, or BODY embed modesLinkRelation
- FIRST, LAST, NEXT, PREVIOUS, etc.
Interfaces
EventStoreInterface
- Main service interfaceHttpClientInterface
- HTTP client abstractionWritableToStream
- Objects that can be written to streams
Docker Environment
The project includes a complete Docker setup with:
- KurrentDB (latest) with projections enabled and health checks
- PHP container with all required extensions and dependencies
- Persistent volumes for KurrentDB data and logs
- Automatic service dependency management
The KurrentDB instance is configured with:
- HTTP API on port 2113
- Default credentials:
admin:changeit
- All projections enabled
- AtomPub over HTTP enabled
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Before submitting:
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This project is not endorsed by Event Store LLP nor Kurrent Inc.
Support
All versions of eventstore-client with dependencies
friendsofouro/http-batch-contract Version ^3.0
friendsofouro/http-batch-implementation Version ^3.0
psr/http-client Version ^1.0
psr/http-client-implementation Version *
psr/http-factory Version ^1.1
psr/http-factory-implementation Version *
psr/http-message Version ^2.0
psr/http-message-implementation Version *
ramsey/uuid Version ^4.9