Ben Ramsey
cd2a361e7c
[ci skip] Set index.rst as the master doc for readthedocs
2020-02-26 22:09:33 -06:00
Ben Ramsey
192ec1767a
[ci skip] Add docs directory and minimal docs
2020-02-26 21:50:46 -06:00
Ben Ramsey
6faaa8078c
Fix CHANGELOG links
2020-02-26 21:14:27 -06:00
Ben Ramsey
f374dae8b2
Prepare for 4.0.0-beta1 release
4.0.0-beta1
2020-02-26 21:12:45 -06:00
Ben Ramsey
05cc0957e8
Use well-named constants to help out your future self
2020-02-26 20:54:29 -06:00
Ben Ramsey
0bd312f944
Improve test coverage
2020-02-26 20:17:49 -06:00
Ben Ramsey
ba7c1c17ce
Add more tests for UuidV6
2020-02-24 15:14:57 -06:00
Ben Ramsey
fec93008bc
Accept Type\Hexadecimal for the first parameter to uuid1()
2020-02-24 14:34:40 -06:00
Ben Ramsey
ab3c89fb8e
Change the $node parameter from mixed to ?Hexadecimal
2020-02-24 13:44:03 -06:00
Ben Ramsey
614fc69b45
Add use statements for PHP functions
2020-02-23 16:13:31 -06:00
Ben Ramsey
a8bbc2f58a
Add ValidatorInterface::getPattern() and set constants to private
2020-02-23 16:12:52 -06:00
Ben Ramsey
84a2e76c7e
Remove currentTime() method
2020-02-23 16:11:50 -06:00
Ben Ramsey
d0b512a597
Add links for documentation
2020-02-23 00:56:11 -06:00
Ben Ramsey
b00ba84a38
Prepare for 4.0.0-alpha5 release
4.0.0-alpha5
2020-02-23 00:52:32 -06:00
Ben Ramsey
aaccc850a1
Use strict argument validation for collections
...
This resolves #106
2020-02-23 00:50:00 -06:00
Ben Ramsey
a8f1692b7f
Prepare for 4.0.0-alpha4 release
4.0.0-alpha4
2020-02-22 23:00:08 -06:00
Ben Ramsey
481b76f2bd
Update CHANGELOG for version 6 UUIDs
2020-02-22 22:46:22 -06:00
Ben Ramsey
cc2bf6f8ef
Support version 6 UUIDs
...
See the following:
* https://github.com/uuid6/uuid6-ietf-draft
* http://gh.peabody.io/uuidv6/
2020-02-22 22:41:15 -06:00
Ben Ramsey
65b0c091c0
Deprecate VALID_PATTERN, UUID_TYPE_IDENTIFIER; suggest replacements
2020-02-21 13:37:06 -06:00
Ben Ramsey
d98764ac16
Enhance the Guid documentation
2020-02-21 13:09:00 -06:00
Ben Ramsey
bfde8d3130
Mark Guid\Guid and Nonstandard\Uuid classes as final
2020-02-21 12:30:46 -06:00
Ben Ramsey
ad75532dc8
Add a Type\TypeInterface that each of the ramsey/uuid types implements
2020-02-21 12:16:49 -06:00
Ben Ramsey
f42afcecbb
Rename Type\IntegerValue to Type\Integer
...
Rename `Type\IntegerValue` to `Type\Integer`. It was originally named
`IntegerValue` because static analysis sees `Integer` in docblock
annotations and treats it as the native `int` type. `Integer` is not a
reserved word in PHP, so it should be named `Integer` for consistency
with other types in this library. When using it, a class alias prevents
static analysis from complaining.
2020-02-21 11:59:49 -06:00
Ben Ramsey
303b973c5c
Remove @psalm-suppress annotations from BrickMathCalculator
...
Closes #294
2020-02-21 03:06:37 -06:00
Ben Ramsey
a7cf07a2d8
Fix microsecond rounding error on 32-bit systems
4.0.0-alpha3
2020-02-21 02:51:31 -06:00
Ben Ramsey
1396eaf756
Prepare for 4.0.0-alpha2 release
4.0.0-alpha2
2020-02-21 01:46:04 -06:00
Ben Ramsey
a78056d42c
Use actual byte string instead of hex2bin() on hex string
2020-02-21 01:41:38 -06:00
Ben Ramsey
e0ff858ff6
Return Hexadecimal from getHex() and IntegerValue from getInteger()
2020-02-21 01:40:14 -06:00
Ben Ramsey
7af4814017
Round microseconds to six digits when getting DateTime from v1 UUIDs
2020-02-21 01:17:05 -06:00
Ben Ramsey
0ae56dbbeb
Merge branch '3.x'
2020-02-20 23:05:38 -06:00
Ben Ramsey
7e1633a696
Skip tests on 32-bit systems
3.9.3
2020-02-20 22:36:14 -06:00
Ben Ramsey
e9012383f8
Fix rounding bug in timestamp for v1 UUIDs
2020-02-20 22:11:28 -06:00
Ben Ramsey
4a44aeab2e
Add a test for the Unix epoch with v1 UUIDs
2020-02-20 17:23:32 -06:00
Ben Ramsey
5f0850c7b5
Add an additional test for last possible date for a v1 UUID
2020-02-20 17:03:08 -06:00
Ben Ramsey
d2edbc9240
Force Travis CI to wait longer before timing out the build
2020-02-14 15:34:13 -06:00
Ben Ramsey
78984c54e9
Exclude phpstan-bootstrap.php from PHPstan analysis
2020-02-08 13:32:23 -06:00
Ben Ramsey
79da637dc0
Make sure the cache directory exists on Travis CI
2020-02-08 13:20:27 -06:00
Ben Ramsey
fb4f54fb84
Address static analysis issues
2020-02-08 13:14:17 -06:00
Ben Ramsey
f965293da9
Specify cache locations for build tools
2020-02-08 13:13:47 -06:00
Ben Ramsey
0bff9e8660
Add NameGeneratorInterface and generators for v3 and v5 UUIDs
2020-02-08 13:12:20 -06:00
Ben Ramsey
e5357f2c8a
Add missing native type hints to test method
2020-02-03 16:07:38 -06:00
Ben Ramsey
2e420f94c4
Revert "Suppress MissingNativeTypeHint error from slevomat/coding-standard"
...
This reverts commit e269c16cd4 .
This issue is fixed in slevomat/coding-standard 6.1.4. See thread at
https://github.com/slevomat/coding-standard/issues/883
2020-02-03 16:01:43 -06:00
Marco Pivetta
c7f71244f3
Imported pecl/uuid constants
2020-02-03 13:15:35 -06:00
Marco Pivetta
dee551deb1
Removed use function imports for mocked/stubbed functions, disabling phpcs import rule
...
While the rule is now disabled, it still is very much valuable to import most pure functions from the core
PHP scope, allowing us some marginal gains on anything that can be inlined by the engine (now or in future).
The rule does not allow selective exclusions, so we will need to keep it off for now.
2020-02-03 13:15:35 -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
Marco Pivetta
598b47d07f
Refining type of producing a string that can be declared as non-empty-string
2020-02-03 11:05:36 -06:00
Ben Ramsey
2108274b4a
Fix UuidFactory::fromDateTime() bug on 32-bit systems
2020-02-03 09:41:23 -06:00
Ben Ramsey
5fa4eb4f17
Add fromDateTime() to create version 1 UUIDs from DateTime instances
...
Fixes #28
2020-02-03 00:48:41 -06:00
Ben Ramsey
e269c16cd4
Suppress MissingNativeTypeHint error from slevomat/coding-standard
2020-02-02 18:38:03 -06:00
Ben Ramsey
6d5f8663ef
Fix issue with non-zero exit code for phpenv
2020-01-29 13:34:01 -06:00