From d0ffcb2d4a667ecbe142845a7aa7bca646150d0c Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 19 Jul 2012 17:02:19 -0500 Subject: [PATCH 01/12] Adding code to detect whether this is a 32-bit or 64-bit PHP build --- README.md | 13 +++++++++++ src/Rhumsaa/Uuid/Uuid.php | 7 ++++++ tests/Rhumsaa/Uuid/EnvironmentTest.php | 30 ++++++++++++++++++++++++++ tests/Rhumsaa/Uuid/UuidTest.php | 10 +++++++++ 4 files changed, 60 insertions(+) create mode 100644 tests/Rhumsaa/Uuid/EnvironmentTest.php diff --git a/README.md b/README.md index 33925c1..f5e906d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,18 @@ A PHP 5.3+ library for generating and working with [RFC 4122][rfc4122] version Much inspiration for this library came from the [Java][javauuid] and [Python][pyuuid] UUID libraries. +## Requirements + +Rhumsaa\Uuid works on 64-bit builds of PHP 5.3.3+. + +Since, this library deals with large integers, so you will need to run it on a +64-bit system with a 64-bit compiled version of PHP. + +**Warning:** The [Windows binaries located on PHP.net][phpwin] are 32-bit +versions of PHP. Even if you run them on a 64-bit version of Windows, this +library will not work. You will need to compile PHP on Windows yourself to +build a 64-bit version. + ## Examples ```php @@ -51,4 +63,5 @@ and install the latest version of the Uuid library into your project: [rfc4122]: http://tools.ietf.org/html/rfc4122 [javauuid]: http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html [pyuuid]: http://docs.python.org/library/uuid.html +[phpwin]: http://windows.php.net/download/ [packagist]: http://packagist.org/ diff --git a/src/Rhumsaa/Uuid/Uuid.php b/src/Rhumsaa/Uuid/Uuid.php index 1565842..84815b3 100644 --- a/src/Rhumsaa/Uuid/Uuid.php +++ b/src/Rhumsaa/Uuid/Uuid.php @@ -97,6 +97,13 @@ final class Uuid */ protected function __construct($msb, $lsb) { + if (PHP_INT_SIZE == 4) { + throw new \OverflowException( + 'Attempting to create a UUID on a 32-bit build of PHP. This ' + . 'library requires a 64-bit build of PHP.' + ); + } + $this->msb = $msb; $this->lsb = $lsb; } diff --git a/tests/Rhumsaa/Uuid/EnvironmentTest.php b/tests/Rhumsaa/Uuid/EnvironmentTest.php new file mode 100644 index 0000000..f562b5d --- /dev/null +++ b/tests/Rhumsaa/Uuid/EnvironmentTest.php @@ -0,0 +1,30 @@ +setExpectedException( + 'OverflowException', + 'Attempting to create a UUID on a 32-bit build of PHP. This library requires a 64-bit build of PHP.' + ); + + $uuid = Uuid::uuid1(); + + } else { + + $this->markTestSkipped('This test is only applicable on a 32-bit system.'); + + } + } +} diff --git a/tests/Rhumsaa/Uuid/UuidTest.php b/tests/Rhumsaa/Uuid/UuidTest.php index 83e2e0d..3485573 100644 --- a/tests/Rhumsaa/Uuid/UuidTest.php +++ b/tests/Rhumsaa/Uuid/UuidTest.php @@ -3,6 +3,16 @@ namespace Rhumsaa\Uuid; class UuidTest extends \PHPUnit_Framework_TestCase { + protected function setUp() + { + // Skip these tests if run on a 32-bit build of PHP + if (PHP_INT_SIZE == 4) { + $this->markTestSkipped( + 'Running tests on a 32-bit build of PHP; 64-bit build required.' + ); + } + } + /** * @covers Rhumsaa\Uuid\Uuid::fromString * @covers Rhumsaa\Uuid\Uuid::__construct From f9a2e38219816aac37867bbf4493bb46322d5747 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 19 Jul 2012 17:05:24 -0500 Subject: [PATCH 02/12] Cleaned up some awkward working in the README. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f5e906d..cf91247 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Much inspiration for this library came from the [Java][javauuid] and ## Requirements -Rhumsaa\Uuid works on 64-bit builds of PHP 5.3.3+. +*Rhumsaa\Uuid works on **64-bit builds** of PHP 5.3.3+.* -Since, this library deals with large integers, so you will need to run it on a +This library deals with large integers, so you will need to run it on a 64-bit system with a 64-bit compiled version of PHP. **Warning:** The [Windows binaries located on PHP.net][phpwin] are 32-bit From 765b3fcf334641b90b9910e1e041ca024e13719b Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 19 Jul 2012 17:07:38 -0500 Subject: [PATCH 03/12] Fixing the broken markdown syntax. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf91247..63aca60 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Much inspiration for this library came from the [Java][javauuid] and ## Requirements -*Rhumsaa\Uuid works on **64-bit builds** of PHP 5.3.3+.* +*Rhumsaa\Uuid works on __64-bit builds__ of PHP 5.3.3+.* This library deals with large integers, so you will need to run it on a 64-bit system with a 64-bit compiled version of PHP. From 13cc05ab369bfff293c537f3d70d13e14030fe5d Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 19 Jul 2012 18:50:48 -0500 Subject: [PATCH 04/12] Finished writing library API documentation for README. --- README.md | 143 +++++++++++++++++++++++++++++++- tests/Rhumsaa/Uuid/UuidTest.php | 4 +- 2 files changed, 144 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 63aca60..ee152f0 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ build a 64-bit version. ```php $compareTo($uuid2)) { + case -1: + echo "$uuid1 is less than $uuid2"; + break; + case 1: + echo "$uuid1 is greater than $uuid2"; + break; + case 0: + default: + echo "$uuid1 is equal to $uuid2"; + } + +bool **equals($obj)** +Compares this UUID to the specified object and returns `true` if they are equal. + +string **getBytes()** +Returns the UUID as a 16-byte string. + +int **getClockSeqHiAndReserved()** +Returns the high field of the clock sequence multiplexed with the variant +(bits 65-72 of the UUID). + +int **getClockSeqLow()** +Returns the low field of the clock sequence (bits 73-80 of the UUID). + +int **getClockSequence()** +Returns the full clock sequence, including the high and low fields. + +\DateTime **getDateTime()** +For version 1 UUIDs, this returns a PHP DateTime object representing the date +and time used to create the UUID. + +array **getFields()** +Returns an array of the fields of the UUID, with keys named according to the +RFC 4122 names for the fields. + +| Field | Meaning | +| -------------------------- | ------------------------------- | +| time_low | the first 32 bits of the UUID | +| time_mid | the next 16 bits of the UUID | +| time_hi_and_version | the next 16 bits of the UUID | +| clock_seq_hi_and_reserved | the next 8 bits of the UUID | +| clock_seq_low | the next 8 bits of the UUID | +| node | the last 48 bits of the UUID | + +int **getLeastSignificantBits()** +Returns the least significant 64 bits of this UUID's 128 bit value. + +int **getMostSignificantBits()** +Returns the most significant 64 bits of this UUID's 128 bit value. + +int **getNode()** +Returns the node value associated with this UUID. + +int **getTimeHiAndVersion()** +Returns the high field of the timestamp multiplexed with the version number +(bits 49-64 of the UUID). + +int **getTimeLow()** +Returns the low field of the timestamp (the first 32 bits of the UUID). + +int **getTimeMid()** +Returns the middle field of the timestamp (bits 33-48 of the UUID). + +int **getTimestamp()** +For version 1 UUIDs, this returns the 60 bit timestamp value used to create +this UUID. The timestamp is measured in 100-nanosecond units since midnight, +October 15, 1582, UTC. It is not a Unix timestamp. + +string **getUrn()** +Returns the string representation of the UUID as a URN. + +int **getVariant()** +Returns the variant number associated with this UUID. + +The variant number has the following meaning: + +* 0 - Reserved for NCS backward compatibility +* 2 - The RFC 4122 variant (used by this class +* 6 - Reserved, Microsoft Corporation backward compatibility +* 7 - Reserved for future definition + +int **getVersion()** +The version number associated with this UUID. The version number describes how +this UUID was generated. + +The version number has the following meaning: + +* 1 - Time-based UUID +* 2 - DCE security UUID +* 3 - Name-based UUID hashed with MD5 +* 4 - Randomly generated UUID +* 5 - Name-based UUID hashed with SHA-1 + +string **toString()** +Converts this UUID into a string representation. This class also implements +__toString(), which will convert this object to a string when it is used in +any string context. + ## Installation diff --git a/tests/Rhumsaa/Uuid/UuidTest.php b/tests/Rhumsaa/Uuid/UuidTest.php index 3485573..0b22a3a 100644 --- a/tests/Rhumsaa/Uuid/UuidTest.php +++ b/tests/Rhumsaa/Uuid/UuidTest.php @@ -507,10 +507,10 @@ class UuidTest extends \PHPUnit_Framework_TestCase // The next three UUIDs are used for comparing msb and lsb in // the compareTo() method - // msb are greater than $uuid4, lsb are greater than $uuid5 + // msb are less than $uuid4, lsb are greater than $uuid5 $uuid3 = Uuid::fromString('44cca71e-d13d-11e1-a959-c8bcc8a476f4'); - // msb are less than in $uuid3, lsb are equal to those in $uuid3 + // msb are greater than $uuid3, lsb are equal to those in $uuid3 $uuid4 = Uuid::fromString('44cca71e-d13d-11e2-a959-c8bcc8a476f4'); // msb are equal to those in $uuid3, lsb are less than in $uuid3 From 7844efd86d56fdc247436485aa8bfbf3d6ee8096 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 19 Jul 2012 18:56:14 -0500 Subject: [PATCH 05/12] Added 64-bit requirement to the description. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 90bc282..4d130a6 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "rhumsaa/uuid", - "description": "A PHP 5.3+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "description": "A PHP 5.3+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID). Requires a 64-bit build of PHP.", "type": "library", "keywords": ["uuid", "identifier", "guid"], "homepage": "https://github.com/ramsey/uuid", From 49429be6302b978073d9962fdd996e248a0738fa Mon Sep 17 00:00:00 2001 From: Marijn Huizendveld Date: Mon, 6 Aug 2012 09:42:37 +0200 Subject: [PATCH 06/12] Correct default `phpunit` configuration filename. The `phpunit.xml.dist` file will now be detected when running `$ phpunit`. --- phpunit.dist.xml => phpunit.xml.dist | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename phpunit.dist.xml => phpunit.xml.dist (100%) diff --git a/phpunit.dist.xml b/phpunit.xml.dist similarity index 100% rename from phpunit.dist.xml rename to phpunit.xml.dist From 53a7d850247c8040e1cf09e7c8d595d40d44572f Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Mon, 6 Aug 2012 07:44:26 -0500 Subject: [PATCH 07/12] Fixing the Travis CI build script. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7de708c..e3b64fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ before_script: - curl -s http://getcomposer.org/installer | php -- --quiet - php composer.phar install -script: phpunit -c phpunit.dist.xml +script: phpunit -c phpunit.xml.dist From dcbb873e62af7a8c8c49b836d08334723c2f1113 Mon Sep 17 00:00:00 2001 From: Marijn Huizendveld Date: Mon, 6 Aug 2012 17:55:15 +0200 Subject: [PATCH 08/12] Add UUID type definition for Doctrine DBAL. This allows the use of [custom mapping types][1] when using the Doctrine DBAL or Doctrine ORM. [1]: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#custom-mapping-types --- composer.json | 3 + src/Rhumsaa/Uuid/Doctrine/UuidType.php | 85 ++++++++++++++++++++ tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php | 51 ++++++++++++ tests/bootstrap.php | 3 +- 4 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 src/Rhumsaa/Uuid/Doctrine/UuidType.php create mode 100644 tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php diff --git a/composer.json b/composer.json index 4d130a6..997f5fd 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,9 @@ "require": { "php": ">=5.3.3" }, + "require-dev": { + "doctrine/dbal": ">=2" + }, "autoload": { "psr-0": {"Rhumsaa\\Uuid": "src/"} } diff --git a/src/Rhumsaa/Uuid/Doctrine/UuidType.php b/src/Rhumsaa/Uuid/Doctrine/UuidType.php new file mode 100644 index 0000000..281ba6f --- /dev/null +++ b/src/Rhumsaa/Uuid/Doctrine/UuidType.php @@ -0,0 +1,85 @@ + + * @license http://opensource.org/licenses/MIT MIT + */ + +namespace Rhumsaa\Uuid\Doctrine; + +use InvalidArgumentException; +use Rhumsaa\Uuid\Uuid; +use Doctrine\DBAL\Types\ConversionException; +use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Platforms\AbstractPlatform; + +/** + * Field type mapping for the Doctrine Database Abstraction Layer (DBAL). + * + * UUID fields will be stored as a string in the database and converted back to + * the Uuid value object when querying. + */ +class UuidType extends Type +{ + /** + * @var string + */ + const NAME = 'uuid'; + + /** + * @param array $fieldDeclaration + * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + } + + /** + * @param string|null $value + * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if(null === $value) { + return null; + } + + try { + $uuid = Uuid::fromString($value); + } catch (InvalidArgumentException $e) { + throw ConversionException::conversionFailed($value, self::NAME); + } + + return $uuid; + } + + /** + * @param Uuid\Uuid|null $value + * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + if(empty($value)) { + return null; + } + + if($value instanceof Uuid) { + return (string) $value; + } + + throw ConversionException::conversionFailed($value, self::NAME); + } + + /** + * @return string + */ + public function getName() + { + return self::NAME; + } +} \ No newline at end of file diff --git a/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php b/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php new file mode 100644 index 0000000..3f8961e --- /dev/null +++ b/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php @@ -0,0 +1,51 @@ +platform = new MockPlatform(); + $this->type = Type::getType('uuid'); + } + + public function testUuidConvertsToDatabaseValue() + { + $uuid = Uuid::fromString('ff6f8cb0-c57d-11e1-9b21-0800200c9a66'); + + $expected = $uuid->toString(); + $actual = $this->type->convertToDatabaseValue($uuid, $this->platform); + + $this->assertEquals($expected, $actual); + } + + public function testUuidConvertsToPHPValue() + { + $uuid = $this->type->convertToPHPValue('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $this->platform); + $this->assertInstanceOf('Rhumsaa\Uuid\Uuid', $uuid); + $this->assertEquals('ff6f8cb0-c57d-11e1-9b21-0800200c9a66', $uuid->toString()); + } + + public function testInvalidUuidConversion() + { + $this->setExpectedException('Doctrine\DBAL\Types\ConversionException'); + $this->type->convertToPHPValue('abcdefg', $this->platform); + } + + public function testNullConversion() + { + $this->assertNull($this->type->convertToPHPValue(null, $this->platform)); + } +} \ No newline at end of file diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 19834b8..447d18b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -9,5 +9,6 @@ if (!file_exists(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'composer.lock')) { } // Include the Composer autoloader -include realpath(dirname(__FILE__) . '/../vendor/autoload.php'); +$loader = include realpath(dirname(__FILE__) . '/../vendor/autoload.php'); +$loader->add("Doctrine\Tests\DBAL", __DIR__."/../vendor/doctrine/dbal/tests"); From 5d9ff8c07e9111e109a9c3a143e26be68a9c3e14 Mon Sep 17 00:00:00 2001 From: Marijn Huizendveld Date: Mon, 6 Aug 2012 18:30:02 +0200 Subject: [PATCH 09/12] Improve code PSR-0, PSR-1 and PSR-2 compliance. - tabs -> spaces - whitespace around control structures --- src/Rhumsaa/Uuid/Doctrine/UuidType.php | 94 ++++++++++---------- tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php | 2 +- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/Rhumsaa/Uuid/Doctrine/UuidType.php b/src/Rhumsaa/Uuid/Doctrine/UuidType.php index 281ba6f..0117816 100644 --- a/src/Rhumsaa/Uuid/Doctrine/UuidType.php +++ b/src/Rhumsaa/Uuid/Doctrine/UuidType.php @@ -28,58 +28,58 @@ class UuidType extends Type /** * @var string */ - const NAME = 'uuid'; + const NAME = 'uuid'; - /** - * @param array $fieldDeclaration - * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform - */ - public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform) - { - return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); - } + /** + * @param array $fieldDeclaration + * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform) + { + return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + } - /** - * @param string|null $value - * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform - */ - public function convertToPHPValue($value, AbstractPlatform $platform) - { - if(null === $value) { - return null; - } + /** + * @param string|null $value + * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function convertToPHPValue($value, AbstractPlatform $platform) + { + if (null === $value) { + return null; + } - try { - $uuid = Uuid::fromString($value); - } catch (InvalidArgumentException $e) { - throw ConversionException::conversionFailed($value, self::NAME); - } + try { + $uuid = Uuid::fromString($value); + } catch (InvalidArgumentException $e) { + throw ConversionException::conversionFailed($value, self::NAME); + } - return $uuid; - } + return $uuid; + } - /** - * @param Uuid\Uuid|null $value - * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform - */ - public function convertToDatabaseValue($value, AbstractPlatform $platform) - { - if(empty($value)) { - return null; - } + /** + * @param Uuid\Uuid|null $value + * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform + */ + public function convertToDatabaseValue($value, AbstractPlatform $platform) + { + if (empty($value)) { + return null; + } - if($value instanceof Uuid) { - return (string) $value; - } + if ($value instanceof Uuid) { + return (string) $value; + } - throw ConversionException::conversionFailed($value, self::NAME); - } + throw ConversionException::conversionFailed($value, self::NAME); + } - /** - * @return string - */ - public function getName() - { - return self::NAME; - } -} \ No newline at end of file + /** + * @return string + */ + public function getName() + { + return self::NAME; + } +} diff --git a/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php b/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php index 3f8961e..5a67b5c 100644 --- a/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php +++ b/tests/Rhumsaa/Uuid/Doctrine/UuidTypeTest.php @@ -48,4 +48,4 @@ class UuidTypeTest extends PHPUnit_Framework_TestCase { $this->assertNull($this->type->convertToPHPValue(null, $this->platform)); } -} \ No newline at end of file +} From ecdb6f4f82db256c46be35cfb7871cd86eabcfff Mon Sep 17 00:00:00 2001 From: Marijn Huizendveld Date: Tue, 7 Aug 2012 00:51:33 +0200 Subject: [PATCH 10/12] Utilize native SQL field type declarations. Doctrine provides a method to get the platform independent SQL field declaration. --- composer.json | 2 +- src/Rhumsaa/Uuid/Doctrine/UuidType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 997f5fd..b4622ca 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.3" }, "require-dev": { - "doctrine/dbal": ">=2" + "doctrine/dbal": ">=2.3" }, "autoload": { "psr-0": {"Rhumsaa\\Uuid": "src/"} diff --git a/src/Rhumsaa/Uuid/Doctrine/UuidType.php b/src/Rhumsaa/Uuid/Doctrine/UuidType.php index 0117816..4c1fc5f 100644 --- a/src/Rhumsaa/Uuid/Doctrine/UuidType.php +++ b/src/Rhumsaa/Uuid/Doctrine/UuidType.php @@ -36,7 +36,7 @@ class UuidType extends Type */ public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { - return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + return $platform->getGuidTypeDeclartionSQL($fieldDeclaration); } /** From b3b621d77d608534e3f718035a8d88a1b0bb18b9 Mon Sep 17 00:00:00 2001 From: Marijn Huizendveld Date: Tue, 7 Aug 2012 00:56:07 +0200 Subject: [PATCH 11/12] Change minimum required package stability. The 2.3 version of `doctrine/dbal` has not been released yet. --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b4622ca..207089c 100644 --- a/composer.json +++ b/composer.json @@ -23,5 +23,6 @@ }, "autoload": { "psr-0": {"Rhumsaa\\Uuid": "src/"} - } + }, + "minimum-stability": "dev" } From 487c61a27f382cdb79b946faf1b75e94392ca986 Mon Sep 17 00:00:00 2001 From: Marijn Huizendveld Date: Tue, 7 Aug 2012 01:00:48 +0200 Subject: [PATCH 12/12] Suggest the installation of `doctrine/dbal`. --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 207089c..24ef289 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,9 @@ "require-dev": { "doctrine/dbal": ">=2.3" }, + "suggest": { + "doctrine/dbal": "Allow the use of a UUID as doctrine field type." + }, "autoload": { "psr-0": {"Rhumsaa\\Uuid": "src/"} },