ramsey/uuid — pull request #9 by ramsey (2013-01-20 17:54:33+00:00)
Title: 32bit Support and Other Improvements

I'm issuing a pull request on my own repository to provide a place for comment and review. @marijn and @ericthelin, I'd very much appreciate you both taking some time to look at this and offer any feedback you might have, especially since you have both helped me quite a bit with this library.

This PR appears rather large, since I included generated API documentation with phpdoc. Feel free to ignore anything in `docs/` and focus on only what's in `src/` and `tests/`.

I have rewritten most of the internals of the class, but I've taken great pains to preserved BC with version 1.1.2. However, there are three BC breaks, which are called out in the changelog:

* getLeastSignificantBits() now returns a Moontoast\Math\BigNumber, even if running on a 64-bit platform. This is because it is an unsigned 64-bit integer, and 64-bit PHP cannot support this. Therefore, we were seeing negative numbers from this method in 1.1.2 and earlier, which was incorrect.
* getMostSignificantBits() ... same as above
* UnsupportedOperationException has been moved to the Exception sub-namespace

While a 64-bit system and Moontoast\Math are recommended, they are not required. In the case that a method requires 64-bit and/or Moontoast\Math, it will throw an `Exception\UnsatisfiedDependencyException`, which can be caught to gracefully degrade. For example, if calling `getTimestamp()` on a 32-bit system, you get this exception, the message of which will include a hint to call `getTimestampHex()` instead.

That's it. Please let me know what you think. I plan to merge this into master sometime next week and tag it with 2.0.0.

Thanks in advance for your feedback!