2017 © Pedro Peláez
 

library doctrine-guid

Doctrine Event Subscriber for automatic generation GUID/UUID

image

lku/doctrine-guid

Doctrine Event Subscriber for automatic generation GUID/UUID

  • Monday, October 2, 2017
  • by lku
  • Repository
  • 1 Watchers
  • 7 Stars
  • 28,331 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 7 % Grown

The README.md

Doctrine GUID Event Subscriber

Build Status Code Coverage Dependency Status, (*1)

This library provides event subscriber for Doctrine ORM, which generates GUID in prePersist event automatically for every entity field with guid type., (*2)

Installation

composer require lku/doctrine-guid

Requirements

  • PHP 5.4+
  • Doctrine ORM 2.4+

Usage

Register event subscriber:

$guidGenerator = new Doctrine\ORM\Id\UuidGenerator();
$subscriber = new LKu\DoctrineGuid\EventSubscriber($guidGenerator);

$entityManager->getEventManager()->addEventSubscriber($subscriber);

Add GUID field definition to entity:

/**
 * @ORM\Entity
 **/
class Entity
{
    /**
     * @ORM\Column(type="guid")
     **/
    protected $guid;
}

After persisting new instance of Entity class in EntityManager it has guid field filled with GUID., (*3)

License

This library is released under the MIT License., (*4)

The Versions

02/10 2017

dev-master

9999999-dev

Doctrine Event Subscriber for automatic generation GUID/UUID

  Sources   Download

MIT

The Requires

 

The Development Requires

12/12 2015

1.0.3

1.0.3.0

Doctrine Event Subscriber for automatic generation GUID/UUID

  Sources   Download

MIT

The Requires

 

The Development Requires

26/02 2015

1.0.2

1.0.2.0

Doctrine Event Subscriber for automatic generation GUID/UUID

  Sources   Download

MIT

The Requires

 

The Development Requires

04/01 2015

1.0.1

1.0.1.0

Doctrine Event Subscriber for automatic generation GUID/UUID

  Sources   Download

MIT

The Requires

 

The Development Requires

03/01 2015

1.0.0

1.0.0.0

Doctrine Event Subscriber for automatic generation GUID/UUID

  Sources   Download

MIT

The Requires

 

The Development Requires