Commit Graph

11 Commits

Author SHA1 Message Date
Ben Ramsey 691c2c816e chore(deps-dev): remove Psalm 2025-05-25 14:53:53 -05:00
Ben Ramsey 078feed166 chore: update nomenclature 2022-09-12 20:56:42 -05:00
Ben Ramsey b78bcda2d1 feat: move UuidV6 to the Rfc4122 namespace 2022-09-12 19:41:46 -05:00
Ben Ramsey b3c26661ca Correct capitalization of microsecond 2020-03-04 16:51:46 -06:00
Ben Ramsey a7cf07a2d8 Fix microsecond rounding error on 32-bit systems 2020-02-21 02:51:31 -06:00
Ben Ramsey 7af4814017 Round microseconds to six digits when getting DateTime from v1 UUIDs 2020-02-21 01:17:05 -06:00
Marco Pivetta a252f29847 Import used functions and constants via use statement to disallow ambiguity for compiler/static-analysis
As documented in https://wiki.php.net/rfc/use_global_elements, the engine (by default) does a local namespace
lookup, then falls back to global namespace when first calling a global function referenced in namespaced code,
unless that function is referenced via fully qualified name (FQN).

By using the FQN, the actual symbol can be looked up at compile-time, both by the PHP engine and by static analysis
tooling, allowing for compiler (in particular) optimizations to replace known hot-path functions with specialized opcodes.

Sadly, no actual benchmark at hand: the improvements can be minimal or massive, depending on where this library is
used (tight loops being most relevant).
2020-02-03 13:15:35 -06:00
Ben Ramsey 7ea7e4282e Validate fields passed to specific UUID version classes 2020-01-20 21:05:06 -06:00
Ben Ramsey a5c7314f8d Fix string passed to DateTimeImmutable 2020-01-20 21:04:26 -06:00
Ben Ramsey a8d52100de Support microtime in returned DateTimeInterface instances
Fixes #90 and supersedes #93.
2020-01-19 23:21:48 -06:00
Ben Ramsey 12a2b0680d Add individual concrete classes for each version of RFC 4122 UUID 2020-01-18 12:14:01 -06:00