The reason are well know and goes down to : While UUIDs already have well defined standards, they suffer from quite bad performance when used as a primary key in DBMS. I recently encountered an issue when calculating the time for an RFC 4122 UUID that had me questioning the accuracy of our modern, accepted calendars, especially with regard to the days of the week on which our dates fall.SoUuid is a working proposal to generate ordered UUIDs in a simple and efficient way using PHP. So, allow me to introduce you to perhaps a familiar face, an old friend, the ramsey/uuid library for PHP. I mention it only in passing in my “ Dates Are Hard” post. It seems quite absurd for me to introduce ramsey/uuid, a library that saw its 1.0.0 release on July 19, 2012, and is now at version 3.4.1, having had 35 releases since its first, but what’s even more ludicrous is that I haven’t once blogged about this library. To generate the documentation on your own, install dev dependencies and run the following command from the root of the project:Ī PHP 5.4 library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID). This project uses ApiGen to generate this documentation. The latest class API documentation is available online. If a particular requirement is not present, then an UnsatisfiedDependencyException is thrown, allowing one to catch a bad call in an environment where the call is not supported and gracefully degrade. Please check the API documentation for more information. However, this library is designed to work on 32-bit builds of PHP without Moontoast\Math, with some degraded functionality. ![]() A 64-bit build of PHP and the Moontoast\Math library are recommended. Some methods in this library have requirements due to integer size restrictions on 32-bit and 64-bit builds of PHP. When installing your project’s dependencies using Composer, you might see the following message:Īfter doing so, you will have the latest ramsey/uuid package in the 2.x series, and there will be no need to modify any code the namespace in the 2.x series is still Rhumsaa. What to do if you see a “rhumsaa/uuid is abandoned” message If using the Doctrine functionality, use Composer to require ramsey/uuid-doctrine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |