Ben Ramsey
55d8833b06
feat: support version 8, custom UUIDs
2022-11-05 17:57:29 -05:00
Ben Ramsey
0ba1ffb029
fix: ensure monotonicity for version 7 UUIDs
2022-11-05 16:29:26 -05:00
Ben Ramsey
283468905a
refactor: improve string encoding performance of non-lazy UUIDs
2022-09-16 11:45:41 -05:00
Ben Ramsey
4000e896f9
refactor: remove dependency on ext-ctype
2022-09-16 09:43:44 -05:00
Ben Ramsey
a180174b0e
fix: update validation to support versions 6 & 7
2022-09-15 22:14:34 -05:00
Ben Ramsey
ae247f1dcd
chore: clean up types and PHP 8-ify the code
2022-09-15 22:14:04 -05:00
Ben Ramsey
685c2f3f23
feat: support max UUIDs
2022-09-14 20:44:24 -05:00
Ben Ramsey
4f4deb1dd6
feat: add UUIDv7 documentation and customization
2022-09-14 18:21:10 -05:00
Ben Ramsey
aa1e488afa
feat: support version 7 (Unix Epoch time) UUIDs
2022-09-13 22:13:33 -05:00
Ben Ramsey
e153b3420a
refactor: discard unnecessary trait
2022-09-13 16:39:59 -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
89905d1948
chore: remove deprecation notices
2022-09-12 19:41:45 -05:00
Ben Ramsey
2083110316
feat: deprecate variant and version constants
2022-08-12 20:18:40 -05:00
George Steel
b4dff559ab
Assert non-empty-string when UUID is valid ( #410 )
...
* Assert, for psalm, the string is non-empty if validation passes
* Adds a test for SA asserting that valid string are also non-empty
* Suppress PHPStan error for unsupported conditional type assertion
* Check SA tools don't complain about non-empty-string as input parameter to `Uuid::isValid()`
2022-08-09 10:04:36 -05:00
Ben Ramsey
bc6cd7d888
Deprecate factory methods; improve deprecation docblocks
2022-08-09 09:24:01 -05:00
Ben Ramsey
2da480d7a3
Fix function type hinting
2022-08-05 17:36:05 -05:00
Ben Ramsey
7b3eaf32c7
Deprecate Uuid::setFactory() and Uuid::getFactory()
2022-08-05 17:34:18 -05:00
Ben Ramsey
55693967d7
Deprecate direct instantiation of Ramsey\Uuid\Uuid
2022-08-05 17:28:11 -05:00
Ben Ramsey
f1891183f9
Upgrade PHPStan
2022-08-05 14:46:56 -05:00
Ben Ramsey
115ec653d8
Un-deprecate UuidInterface::getUrn()
2022-03-27 20:55:27 -05:00
Ben Ramsey
d98bef096f
Deprecate Ramsey\Uuid\Generator\RandomLibAdapter
2022-03-27 13:03:58 -05:00
Marco Pivetta
f0ada112c5
Allow iterable<T> where ramsey/collection would be used, deprecate collection classes
...
This patch is based on https://github.com/ramsey/uuid/pull/405
As discussed in https://github.com/ramsey/uuid/pull/405#discussion_r832095457 , the `ramsey/collection`
dependency can be phased out.
Doing so via direct removal is not feasible without a clear BC break, so this change only deprecates:
* `Ramsey\Uuid\Builder\BuilderCollection`
* `Ramsey\Uuid\Provider\Node\NodeProviderCollection`
These classes will then be removed in `5.0.0`, along with the `ramsey/collection` dependency.
2022-03-22 17:30:42 +01:00
Marco Pivetta
4cae6c8914
Removed redundant string cast, now correctly identified by vimeo/psalm:^4.20
...
`substr()` only fails when one of the inputs is not a `string`, but that no longer
holds true as per `php:^8.0`, since the input must be a `string` upfront.
2022-03-22 12:42:55 +01:00
Marco Pivetta
95eb7de42b
Removed redundant range check, now correctly identified by vimeo/psalm:^4.20
2022-03-22 12:42:10 +01:00
hubipe
e3e9179f27
LazyUuidFromString for valid UUIDs in uppercase ( #401 )
2022-01-29 13:05:59 -06:00
Ben Ramsey
852850b7da
Remove mocks for ext-uuid functions
2021-09-23 18:49:10 -05:00
Graham Campbell
2ed177534e
Ignore serialization shape checking for code coverage purposes
2021-09-05 14:03:47 +01:00
Graham Campbell
0997de99a2
Add support for PHP 8.1
2021-09-05 12:41:13 +01:00
Chris Smith
8fa223b1af
Fix soft BC break of Uuid::fromString()
...
Uses an assertion to indicate the `$uuid` variable cannot be an empty
string, satisfying docblock on `LazyUuidFromString`.
2021-08-09 12:51:40 +01:00
Ben Ramsey
4666f7128f
Merge branch 'main' into patch-1
2021-08-06 16:27:50 -05:00
Ben Ramsey
06f8e67792
Merge pull request #361 from slevomat/patch-1
...
Serialization should not use internal codec
2021-08-06 16:25:27 -05:00
Ben Ramsey
7ca2832d3b
chore: suppress redundant condition complaint
2021-08-06 16:14:11 -05:00
Ben Ramsey
fb9ef508b0
Merge branch 'fix-static-analysis' of https://github.com/pawel-slowik/uuid into pawel-slowik-fix-static-analysis
2021-08-06 16:08:43 -05:00
Ben Ramsey
0b4be8392a
fix: check whether property is set
2021-08-06 14:29:01 -05:00
Ben Ramsey
4511ccd7e6
chore(deps): upgrade vimeo/psalm
2021-08-06 14:25:16 -05:00
Ben Ramsey
c005f69d6e
chore: update package files
2021-08-06 14:05:57 -05:00
Paweł Słowik
fe475968db
Assure unserialized NodeProviderCollection contains only valid elements
...
This stops Psalm from complaining about MixedPropertyTypeCoercion
2021-05-24 22:48:58 +02:00
Paweł Słowik
7e4909e764
Assure unserialized BuilderCollection contains only valid elements
...
This stops Psalm from complaining about MixedPropertyTypeCoercion
2021-05-24 22:44:43 +02:00
Paweł Słowik
aeb5e4d297
Specify NodeProviderCollection element type
...
This stops PHPStan from complaining:
Class Ramsey\Uuid\Provider\Node\NodeProviderCollection extends generic class
Ramsey\Collection\AbstractCollection but does not specify its types: T
2021-05-24 22:31:23 +02:00
Paweł Słowik
605ff66148
Specify BuilderCollection element type
...
This stops PHPStan from complaining:
Class Ramsey\Uuid\Builder\BuilderCollection extends generic class
Ramsey\Collection\AbstractCollection but does not specify its types: T
2021-05-24 22:30:57 +02:00
Barney Hanlon
90a87a7543
Add interface for UUID-related exceptions ( #340 )
...
Add common interface for exceptions so that wrappers can identify that is a UUID-related exception
2021-04-23 11:12:51 -05:00
Jan Langer
ef25479d05
Serialization should not use internal codec
2021-02-05 17:36:26 +01:00
Ben Ramsey
59957e2b2d
Merge branch 'master' into patch-1
2020-10-29 18:30:23 -05:00
Ben Ramsey
b941aa1a9a
Prepare test suite for PHP 8
2020-10-29 18:24:14 -05:00
Remi Collet
ae7df1ceb9
catch ValueError raised by PHP 8 ( #352 )
2020-10-29 11:57:41 -05:00
Ben Ramsey
0a25f73ae0
Fix static analysis issues
2020-10-28 21:19:26 -05:00
Ben Ramsey
205bba2e12
Merge branch 'master' into patch-1
2020-08-23 15:09:47 -05:00
Bilge
49b772a5e2
Removed redundant interface inheritance.
2020-08-23 19:36:53 +01:00
Marco Pivetta
0c2b4074d2
Minor performance optimization: LazyUuidFromString#unwrap() now uses an internal instance cache for unwrapped instances
2020-07-09 14:39:36 +02:00