2017 © Pedro Peláez
 

library cqrs-factory

CQRS factories for container-interop

image

pauci/cqrs-factory

CQRS factories for container-interop

  • Thursday, May 25, 2017
  • by pauci
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,343 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 12 Versions
  • 5 % Grown

The README.md

CQRS factories

Latest Stable Version Total Downloads Build Status Coverage Status, (*1)

CQRS factories for PSR-11, (*2)

This package provides a set of factories to be used with containers using the PSR-11 standard for an easy CQRS integration in a project., (*3)

Installation

The easiest way to install this package is through composer:, (*4)

$ composer require pauci/cqrs-factory

Configuration

In the general case where you are only using a single command bus, it's enough to define the command bus factory:, (*5)

return [
    'dependencies' => [
        'factories' => [
            'cqrs.command_bus.cqrs_default' => \CQRSFactory\CommandBusFactory::class,
        ],
    ],
];

If you want to add a second command bus, or use another name than "cqrs_default", you can do so by using the static variants of the factories:, (*6)

return [
    'dependencies' => [
        'factories' => [
            'cqrs.command_bus.cqrs_other' => [\CQRSFactory\CommandBusFactory::class, 'cqrs_other'],
        ],
    ],
];

Each factory supplied by this package will by default look for a registered factory in the container. If it cannot find one, it will automatically pull its dependencies from on-the-fly created factories. This saves you the hassle of registering factories in your container which you may not need at all. Of course, you can always register those factories when required. The following additional factories are available:, (*7)

  • \CQRSFactory\EventBusFactory (cqrs.event_bus.*)
  • \CQRSFactory\EventPublisherFactory (cqrs.event_publisher.*)
  • \CQRSFactory\EventStoreFactory (cqrs.event_store.*)
  • \CQRSFactory\IdentityMapFactory (cqrs.identity_map.*)
  • \CQRSFactory\SerializerFactory (cqrs.serializer.*)
  • \CQRSFactory\TransactionManagerFactory (cqrs.transaction_manager.*)

Each of those factories supports the same static behavior as the command bus factory. For container specific configurations, there are a few examples provided in the example directory:, (*8)

Example configuration

A complete example configuration can be found in example/config.php., (*9)

The Versions

25/05 2017

dev-master

9999999-dev

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2017

v0.3.2

0.3.2.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

26/04 2017

v0.3.1

0.3.1.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

25/04 2017

v0.3.0

0.3.0.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

10/04 2017

v0.2.1

0.2.1.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

03/03 2017

dev-feature/php7

dev-feature/php7

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

07/09 2016

0.2.0

0.2.0.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

10/03 2016

0.1.4

0.1.4.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

10/03 2016

0.1.3

0.1.3.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

09/03 2016

0.1.2

0.1.2.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

03/03 2016

0.1.1

0.1.1.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires

02/03 2016

0.1.0

0.1.0.0

CQRS factories for container-interop

  Sources   Download

MIT

The Requires

 

The Development Requires