Commit Graph

416 Commits

Author SHA1 Message Date
Ben Ramsey b551e4645d Remove deprecated Uuid::VALID_PATTERN constant 2022-08-05 16:52:23 -05:00
Ben Ramsey 346f840e21 Merge branch '4.x' into 5.x 2022-08-05 15:17:01 -05:00
Ben Ramsey f1891183f9 Upgrade PHPStan 2022-08-05 14:46:56 -05:00
Ben Ramsey 10e2f3664b Merge branch '4.x' into 5.x 2022-08-05 12:38:23 -05:00
Alexander Schranz a800c468aa Remove dependency to moontoast/math (#426) 2022-08-05 11:50:28 -05:00
Simon Podlipsky 9a8ea11ad3 fix: adapt tests to reflect GH-7758 (#435) 2022-08-05 11:31:53 -05:00
Ben Ramsey 382fdf777f chore: upgrade PHPStan 2022-04-01 17:41:59 -05:00
Ben Ramsey dec678d60b feat: remove deprecated Serializable interface 2022-04-01 17:41:58 -05:00
Ben Ramsey 13edf70fc9 feat: introduce Variant enum and use instead of constants 2022-04-01 17:41:58 -05:00
Ben Ramsey 9849671d20 Remove deprecated getNumberConverter() method 2022-03-27 23:06:05 -05:00
Ben Ramsey d2ae388821 Remove deprecated getDateTime() method 2022-03-27 22:52:01 -05:00
Ben Ramsey 5b98a2fee1 Introduce TimeBasedInterface for UUIDs derived from time 2022-03-27 22:50:14 -05:00
Ben Ramsey cc4df59001 Remove deprecated getVersion() method 2022-03-27 21:47:55 -05:00
Ben Ramsey 8595a6d8c1 Remove deprecated getVariant() method 2022-03-27 21:28:55 -05:00
Ben Ramsey 506a781667 Remove deprecated getFieldsHex() method 2022-03-27 20:40:12 -05:00
Ben Ramsey 67abb86aaf Remove remaining deprecated getClockSeq*() methods 2022-03-27 20:32:00 -05:00
Ben Ramsey e4c7ea0755 Remove deprecated getNode*() methods 2022-03-27 20:22:45 -05:00
Ben Ramsey 23d54b85cb Remove deprecated getTimestamp*() methods 2022-03-27 20:05:08 -05:00
Ben Ramsey b0b5c12bac Remove deprecated getTimeMid*() methods 2022-03-27 19:45:17 -05:00
Ben Ramsey 045c33ba3b Remove deprecated getTimeLow*() methods 2022-03-27 19:34:45 -05:00
Ben Ramsey c47a71f2b1 Remove deprecated getTimeHiAndVersion*() methods 2022-03-27 19:20:40 -05:00
Ben Ramsey eed2aecc17 Remove deprecated getMostSignificantBits*() methods 2022-03-27 18:58:06 -05:00
Ben Ramsey 5541b3d045 Remove deprecated getLeastSignificantBits*() methods 2022-03-27 18:51:18 -05:00
Ben Ramsey f810c0a50c Remove deprecated getClockSequenceHex() method 2022-03-27 18:44:47 -05:00
Ben Ramsey ddb4ce0aca Remove deprecated getClockSeqLowHex() method 2022-03-27 18:32:51 -05:00
Ben Ramsey 1d4077d213 Remove deprecated getClockSeqHiAndReservedHex() method 2022-03-27 16:37:53 -05:00
Ben Ramsey eebc792d6f Remove deprecated Ramsey\Uuid\Builder\DefaultUuidBuilder 2022-03-27 13:59:57 -05:00
Ben Ramsey 2fad6c1107 Specify length as a positive-int 2022-03-27 13:51:50 -05:00
Ben Ramsey 18688488e1 Remove deprecated "degraded" classes that used moontoast/math 2022-03-27 13:51:14 -05:00
Ben Ramsey c2cfd0c4fb Remove deprecated Ramsey\Uuid\Generator\RandomLibAdapter 2022-03-27 13:17:39 -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 5f9cd80b1b Migrated from PHPUnit_Framework_TestCase#assertRegExp() (deprecated) to #assertMatchesRegularExpression() 2022-03-22 12:43:22 +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
Ben Ramsey aa6535442e Show deprecations in tests 2021-09-23 17:04:10 -05:00
Chris Smith ef1eb74c82 Add test covering Uuid::fromString() being called with empty string 2021-08-09 12:55:31 +01: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 d7379b67af test: update exception message for PHP 8.1 2021-08-06 14:35:42 -05:00
Ben Ramsey c005f69d6e chore: update package files 2021-08-06 14:05:57 -05:00
Jan Langer ef25479d05 Serialization should not use internal codec 2021-02-05 17:36:26 +01:00
Ben Ramsey b941aa1a9a Prepare test suite for PHP 8 2020-10-29 18:24:14 -05:00
Remi Collet e20165e9dd use expectError instead of expectException (#351) 2020-10-29 10:07:00 -05:00
Ben Ramsey 954cb23d5e Allow builds to fail on PHP 8.0 2020-10-28 22:22:54 -05:00
Ben Ramsey 0a25f73ae0 Fix static analysis issues 2020-10-28 21:19:26 -05:00
Bilge 7947413a76 Use assertSame instead of assertEquals. 2020-08-23 13:53:19 +01:00
Marco Pivetta fa14d04231 Added benchmark about extracting UUID field details 2020-07-09 14:23:49 +02:00
Marco Pivetta 6339cd9fbc Added UUID serialization benchmark 2020-07-09 14:15:05 +02:00
Marco Pivetta b805572537 Ensure that Uuid::uuidX() generators produce instances equivalent to Uuid::fromString() and Uuid::fromBytes()
With this change, `Uuid::uuid1()`, `Uuid::uuid2()` and so forth now produce a `LazyUuidFromString` instance, which
is both more memory efficient and comparable to `Uuid::fromString()` instances in other tools, such as within
PHPUnit's `Assertion::assertEqual()`, which would reject any two objects not matching each other's types.

Before this patch, `Assertion::assertEquals(Uuid::uuid5(...), Uuid::fromString(...))` would always fail due to
different subtypes produced by the two factory methods.
2020-07-09 13:57:30 +02:00
Marco Pivetta 2421b79841 Added benchmark for UUID generation logic 2020-07-09 13:57:30 +02:00
Marco Pivetta 1f0cd71d93 Applied fixes and suppressions (sadly) to match psalm/phpstan code quality guidelines
We have a lot of deprecated API in here which shouldn't exist in first place, but that
will luckily disappear with v5.0.0 :-)
2020-07-09 13:57:30 +02:00