Download the PHP package phpgears/event-async without Composer

On this page you can find all versions of the php package phpgears/event-async. 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-async

PHP version Latest Version License

Build Status Style Check Code Quality Code Coverage

Total Downloads Monthly Downloads

Async Event

Async decorator for Event bus

Installation

Composer

Usage

Require composer autoload file

Asynchronous Events Bus

Event bus decorator to handle events asynchronously

Enqueue

Please mind that enqueuing process is independent of event handling, does not prevent the event from being handled. Enqueuing an event happens in first place and then the event is dispatched as normal to the wrapped event bus

Dequeue

This part is highly dependent on the message queue of your choosing, though event serializers can be used to deserialize queue message

This is just an example of the process

Deserialized events should be wrapped in Gears\Event\Async\ReceivedEvent in order to avoid infinite loops should you decide to dispatch the events to an async event bus. If you decide to use a non-async bus on the dequeue side you don't need to do this wrapping

Discriminator

Discriminates whether a event should or should not be enqueued based on arbitrary conditions

Three discriminators are provided in this package

Event queue

This is the one responsible for actual async handling, which would normally be sending the serialized event to a message queue system such as RabbitMQ

No implementation is provided in this package but an abstract base class so you can extend from it

You can use event-async-queue-interop that uses queue-interop for enqueuing messages

Serializer

Abstract event queue uses serializers to do event serialization so it can be sent to the message queue as a string message

Gears\Event\Async\Serializer\JsonEventSerializer is directly provided as a general serializer allowing maximum compatibility in case of events being handled by other systems

You can create your own serializer if the one provided does not fit your needs, for example by using JMS serializer, by implementing Gears\Event\Async\Serializer\EventSerializer interface

Distributed systems

On distributed systems, such as micro-service systems, events can be dequeued on a completely different part of the system, this part should of course know about events triggered and their contents but could eventually not have access to the event class itself

For example in the context of Domain Events on DDD a bounded context could react to events triggered by another completely different bounded context and of course won't be able to deserialize the original event as it is located on another domain

This can be solved in one of two ways, transform messages coming out from the message queue before handing them to the event serializer, or better by creating a custom Gears\Event\Async\Serializer\EventSerializer encapsulating this transformation

Transformation can be as simple as changing event class to be reconstituted

Contributing

Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before.

See file CONTRIBUTING.md

License

See file LICENSE included with the source code for a copy of the license terms.


All versions of event-async with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
ext-json Version *
phpgears/event Version ~0.3.1
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 phpgears/event-async contains the following files

Loading the files please wait ....