Download the PHP package morebec/orkestra-postgresql-eventstore without Composer

On this page you can find all versions of the php package morebec/orkestra-postgresql-eventstore. 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 orkestra-postgresql-eventstore

PostgreSqlEventStore

This component provides an implementation of a the an Event Store (from the [EventSourcing Component]()) using PostgreSQL.

Under the hood, it uses DBAL for communication with PostgreSQL.

Installation

Usage

Event Store Subscriptions

The pu/sub mechanism of the event store is implemented using PostgreSQL's LISTEN/NOTIFY feature. Unfortunately given the nature of PHP being a synchronous RunTime, the only way to have Pub/Sub capabilities is to run a LISTEN loop:

This is can be used with Event Processors.

PostgreSqlEventStorePositionStorage

An implementation of EventStorePositionStorageInterface is also shipped with the component as the PostgreSqlEventStorePositionStorage, which also relies on DBAL for communication with PostgreSQL:

PostgreSqlEventProcessor

A ready-made implementation of an Event Processor with support for the PostgreSqlEventStore is also provided with this component:

Given that the EventStoreInterface can be decorated, the processor cannot directly use the PostgreSqlEventStore through the EventStoreInterface. Also, since it requires using specific methods from the implementation PostgreSqlEventStore to access some PostgreSQL specific features, the actual instance of the PostgreSqlEventStore must be injected additionally. This is why both are injected in the constructor.

Testing

To run the tests execute the following command:

It is required to have an instance of postgresql running with a password-less role postgres and a database named postgres. To easily get this setup and running a docker-compose configuration file is available at the root of this project.

To run it simply execute the following command:


All versions of orkestra-postgresql-eventstore with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
ext-pdo Version *
ext-pgsql Version *
ext-pdo_pgsql Version *
doctrine/dbal Version ^3.0
morebec/orkestra-datetime Version ^2.5.6
morebec/orkestra-event-sourcing Version ^2.5.6
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 morebec/orkestra-postgresql-eventstore contains the following files

Loading the files please wait ....