Download the PHP package mannum/laravel-eventstore without Composer

On this page you can find all versions of the php package mannum/laravel-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 laravel-eventstore

Laravel EventStore

This package integrates Greg Young's eventstore into Laravel's event system. By simply implementing ShouldBeStored on your events, they will be sent to eventstore. In the same fashion you can also setup listeners that can respond to events that are received from the eventstore.

Example implementation: https://github.com/digitalrisks/laravel-eventstore-example

Installation

You can install the package via composer:

Add the base service provider for the package.

In your config/app.php file, add the following to the providers array.

Example Event

Usage - Sending Events

The package will automatically send events dispatched in Laravel that implement the ShouldBeStored interface.

To assist in implementing the interface, the package comes with a SendsToEventStore trait which meets the requirements of the interface in a basic fashion:

Then raising an event is done in the normal Laravel way:

Metadata

Metadata can help trace events around your system. You can include any of the following traits on your event to attach metadata automatically

Or you can define your own methods to collect metadata. Any method with the @metadata annotation will be called:

Testing

If you would like to test that your events are being fired correctly, you can use the Laravel Event::mock method, or the package comes with helpers that interact with an eventstore to confirm they have been stored correctly.

Usage - Receiving Events

You must first run the worker which will listen for events.

None of the options are required. By default it will run the persistance subscription with a timeout of 10 seconds and 1 parallel event at a time.

When an event is received, it will be mapped to the Laravel event and the original EventRecord can be accessed via getEventRecord().

You can react to these events in the normal Laravel fashion.

If you are listening to the same stream where you are firing events, your events WILL BE fired twice - once by Laravel and once received from the event store. You may choose react synchronously if $event->getEventRecord() is false and asynchronously if $event->getEventRecord() returns the eventstore record.

In addition, if you would like to test that are events are created AND how the application reacts to those events you may set eventstore.connection to sync. This will trick the event listeners into thinking that the event has been received from the eventstore.

Testing

If you would like to test your listeners, the package comes with several helper methods to mimic events being received from the worker.

In addition you may set set eventstore.connection to sync, which will trick your listeners

Usage - Replaying Events

You can replay events by using the replay command

`

<event> can be a single event number or a range like 390-396

Configuration

The defaults are set in config/eventstore.php. Copy this file to your own config directory to modify the values:

php artisan vendor:publish --provider="DigitalRisks\LaravelEventStore\ServiceProvider"

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-eventstore with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
guzzlehttp/guzzle Version ^6.3 || ^7.0
illuminate/support Version 5.7.* || 5.8.* || ^6.0 || ^7.0 || ^8.0
ramsey/uuid Version ^3.8 || ^4.0
rxnet/eventstore-client Version dev-ramsey-uuid-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 mannum/laravel-eventstore contains the following files

Loading the files please wait ....