2017 © Pedro Peláez
 

library tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

image

league/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  • Thursday, July 26, 2018
  • by rosstuck
  • Repository
  • 7 Watchers
  • 28 Stars
  • 232,319 Installations
  • PHP
  • 12 Dependents
  • 1 Suggesters
  • 9 Forks
  • 0 Open issues
  • 13 Versions
  • 17 % Grown

The README.md

tactician-doctrine

Latest Version Software License Build Status Quality Score Total Downloads, (*1)

This package adds plugins for using Tactician with Doctrine components, either the ORM or just DBAL. The main feature is the ability to wrap each command in a separate database transaction., (*2)

Setup

Via Composer, (*3)

``` bash $ composer require league/tactician-doctrine, (*4)


Next, add the `ORM\TransactionMiddleware` to your CommandBus: ``` php $commandBus = new \League\Tactician\CommandBus( [ new TransactionMiddleware($ormEntityManager) ] );

That's it. Each command you execute will now open and close a new transaction., (*5)

If a command fires off more commands, be aware that those commands will run in the same transaction as the parent. It is recommended that you run each command as a separate transaction, so to prevent this from happening, use the LockingMiddleware that ships in Tactician core. This will queue the commands up internally until the parent command has completed., (*6)

If an exception is raised while handling the command, the transaction is rolled back, the EntityManager closed, and the exception rethrown., (*7)

Symfony integration

When using the [tactician-bundle] (https://github.com/thephpleague/tactician-bundle), don't forget to add the Doctrine middleware to your Symfony config:, (*8)

tactician:
    commandbus:
        default:
            middleware:
             - tactician.middleware.locking
             - tactician.middleware.doctrine
             - tactician.middleware.command_handler

Testing

bash $ ./vendor/bin/phpunit, (*9)

Security

Disclosure information can be found on the main Tactician repo., (*10)

License

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

The Versions

26/07 2018

dev-master

9999999-dev https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

13/04 2018

v1.1.1

1.1.1.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

05/01 2017

v1.1

1.1.0.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

28/02 2016

v1.0.3

1.0.3.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

20/02 2016

v1.0.2

1.0.2.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

20/02 2016

v1.0.1

1.0.1.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

31/12 2015

v1.0.0

1.0.0.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

08/05 2015

v0.6.0

0.6.0.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

04/05 2015

v0.5.0

0.5.0.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

13/03 2015

v0.3

0.3.0.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

13/03 2015

v0.4.0

0.4.0.0 https://github.com/thephpleague/tactician-doctrine

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

28/02 2015

v0.2

0.2.0.0 https://github.com/thephpleague/tactician-doctrine-orm

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician

27/02 2015

v0.1

0.1.0.0 https://github.com/thephpleague/tactician-doctrine-orm

Plugins for Tactician commands using Doctrine, like wrapping every command in a transaction

  Sources   Download

MIT

The Requires

 

The Development Requires

command bus doctrine transactions tactician