prooph / event-store-client
Event Store Client for async TCP connections
Installs: 134 559
Dependents: 3
Suggesters: 0
Security: 0
Stars: 114
Watchers: 12
Forks: 32
Open Issues: 3
Requires
- php: ^7.2
- ext-json: *
- amphp/amp: ^2.1.2
- amphp/artax: ^3.0.14
- amphp/byte-stream: ^1.6
- amphp/file: ^0.3.5
- amphp/socket: ^0.10.12
- google/protobuf: ^3.9
- prooph/event-store: v8.0.0-RC-1
- ramsey/uuid: ^3.8
Requires (Dev)
- amphp/log: ^1.0
- doctrine/instantiator: ^1.1
- php-coveralls/php-coveralls: ^2.1
- phpspec/prophecy: ^1.7.2
- phpunit/phpunit: ^8.2.2
- prooph/php-cs-fixer-config: ^0.3
- sebastian/object-enumerator: ^3.0.3
Suggests
- ext/protobuf: for protobuf PHP extension (pecl)
- dev-master
- v1.0.0-RC-1
- v1.0.0-beta-10
- v1.0.0-beta-9
- v1.0.0-beta-8
- v1.0.0-beta-7
- v1.0.0-beta-6
- v1.0.0-beta-5
- v1.0.0-beta-4
- v1.0.0-beta-3
- v1.0.0-beta-2
- v1.0.0-beta-1
- dev-dependabot/composer/google/protobuf-tw-v3.24.3or-tw-4.0.0
- dev-feature/unreference-heartbeat
- dev-better-test
- dev-unreferenced_heartbeat
This package is auto-updated.
Last update: 2024-11-09 20:39:47 UTC
README
PHP 8.1 Event Store Client Implementation.
Overview
Prooph Event Store Client supports async non-blocking communication via TCP to EventStore.
The EventStoreConnection
maintains a full-duplex connection between the client and the Event Store server.
Extensions
The protobuf
extension from Google is recommended, however it is not required.
When this extension is missing, the client will fallback to use google/protobuf
installable via composer.
The extension allegro/php-protobuf is not compatible.
Additional extensions are only needed if your app necessitates a high numbers of concurrent socket connections.
Installation
Client
You can install prooph/event-store-client via composer by adding "prooph/event-store-client": "dev-master"
as requirement to your composer.json.
Server
Using docker:
docker run --name eventstore-node -it -p 2113:2113 -p 1113:1113 eventstore/eventstore
Please refer to the documentation of eventstore.org.
See server section.
In the docker-folder you'll find three different docker-compose setups (single node, 3-node-cluster and 3-node-dns-cluster).
Quick Start
For a short overview please see the examples
folder.
Unit tests
Plain PHP
Run the server with memory database
Note: This is the start-script of the Event Store database, not something provided by this library!
./run-node.sh --run-projections=all --mem-db
You need to ignore the ignore
group
./vendor/bin/phpunit --exclude-group=ignore
Those are tests that only work against an empty database and can only be run manually.
Before next run, restart the server. This way you can always start with a clean server.
Using Docker
See: https://github.com/prooph/event-store-client/tree/master/docker/unittest
Documentation
Documentation is on the prooph website.
Support
- Ask questions on Stack Overflow tagged with #prooph.
- File issues at https://github.com/prooph/event-store-client/issues.
- Say hello in the prooph gitter chat.
Contribute
Please feel free to fork and extend existing or add new plugins and send a pull request with your changes! To establish a consistent code quality, please provide unit tests for all your changes and may adapt the documentation.
License
Released under the New BSD License.