Download the PHP package ipresence/domain_events without Composer

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

Domain Events

Build Status

A domain event is something that happened on your application that is interesting for the business. With this component you will be able to publish an listen to events really easily.

TL;DR

Table of contents

Installation

Require the package as usual

To use RabbitMQ as a queue (the default option), you have to require it manually

Usage

Manually

Publishing

Listening

Symfony

If you are using symfony, the easiest wait is to use it as a bundle, you just need to add IPresence\DomainEvents\Symfony\DomainEventsBundle::class in your bundles.php file and this will load the domain_events.yaml config located inside config/packages/. At that point you'll have the Publisher and Listener defined in the dependency injection container ready to be used.

Flow

The currently, we just have RabbitMQ. Here you can see the flowchart:

This library is not only going to create a publisher and listener for you, it will also create the RabbitMQ exchanges and queues so you don't need to worry about that part.

Configuration

The library allows to build the publisher and the listener from a set configuration values. For example:

Rabbit configuration values

Exchange configuration values
Queue configuration values
Consumer configuration values

Requirements

The library allows to use different queues, an adapter for RabbitMQ is included in the library but you must require the dependency manually

Logging

Do you want to know why you can't send a domain event or why you are not receiving it? No problem, the library accepts any Psr-3 logger logger implementation (like Monolog) to write debug and error messages. You just need to tell the builder that you want to use it.

Monitoring

Do you want to know how many domain events are been published or consumed? No problem, the library accepts any monitor that implements this interface. You just need to tell the builder that you want to use it.

Compatibility

This library has been tested with the following PHP versions and setups

PHP php-amqplib/php-amqplib result
7.1 2.8.1 :white_check_mark:
7.2 2.8.1 :white_check_mark:
7.3 2.8.1 :white_check_mark:

Development environment

To build the test environment you'll need docker and docker-compose installed:

Running the tests

You can run the tests only for a php version like this

Stop the environment

Delete the environment

You can delete the docker images for a total clean-up


All versions of domain_events with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
ext-json Version *
psr/log Version ^1.0
ramsey/uuid Version ^3.8
ipresence/monitoring Version ^1.0
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 ipresence/domain_events contains the following files

Loading the files please wait ....