Download the PHP package neos/event-sourcing-symfony-bridge without Composer

On this page you can find all versions of the php package neos/event-sourcing-symfony-bridge. 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 event-sourcing-symfony-bridge

Symfony bridge for Event Sourcing and CQRS

Library providing interfaces and implementations for event-sourced applications for Symfony Applications.

This package is the symfony adapter of Neos.EventSourcing (which was created for the Neos/Flow framework).

Demo

Check out the Symfony Demo Repository:

https://github.com/Inchie/symfony-eventsourcing-demo.git

Getting started

In your symfony application, install this package and neos/event-sourcing via composer:

Setting up a Doctrine Event Store

Since there could be multiple Event Stores simultaneously in one application, this package comes without a pre-configured "default" store. It is just a matter of a couple of lines of YAML to configure a custom store:

config/packages/neos_eventsourcing.yaml:

Set the charset in the doctrine config to utf8mb4 by adding the following lines.

config/packages/doctrine.yaml:

Add the following to bundles.php:

To make use of the newly configured Event Store one more step is required in order to finish the setup (in this case to create the corresponding database table):

Writing events

Example event: BlogWasCreated.php

Reading events

Reacting to events

In order to react upon new events you'll need an event listener:

The when*() methods of classes implementing the EventSubscriberInterface and ProjectorInterface will be invoked whenever a corresponding event is committed to the Event Store.

NOTE!!! You always have to use "when*" namings, as otherwise, the EventListenerInvoker will not properly call the right methods here (see https://github.com/neos/Neos.EventSourcing/issues/282)

Replay projection

With the following command you can rebuild a projection.

Events & event listeners

The Neos EventSourcing package comes with its own events and event listeners implementation. We cannot use this implementation for several reasons in the symfony context.

To get the listeners (subscribers in symfony) for an event we call the symfony event dispatcher (in the SymfonyEventPublisher).

The listeners are handled by the InternalCatchUpEventListenerCommand. This command uses the (Neos EventSourcing) EventListenerInvoker to call the listeners method name.

The specialty about this is that the EventSourcing package uses the "when" namings. For that reason the listeners method names have to start with when prefix too (@see Reacting to events).

All configuration options in neos_eventsourcing.yml

Internal Implementation

How is this package constructed? We try to give an overview here:

composer.json

We replace neos/flow and flowpack/jobqueue-common to ensure these are not installed.


All versions of event-sourcing-symfony-bridge with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
symfony/serializer Version ^5.4
symfony/property-access Version ^5.4
neos/error-messages Version *
neos/utility-objecthandling Version *
ramsey/uuid Version ^3.9
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 neos/event-sourcing-symfony-bridge contains the following files

Loading the files please wait ....