Commit Graph

23 Commits

Author SHA1 Message Date
Ben Ramsey 078feed166 chore: update nomenclature 2022-09-12 20:56:42 -05:00
Ben Ramsey 89905d1948 chore: remove deprecation notices 2022-09-12 19:41:45 -05:00
Ben Ramsey bc6cd7d888 Deprecate factory methods; improve deprecation docblocks 2022-08-09 09:24:01 -05:00
Marco Pivetta 15a5d4f5e1 Propagating @psalm-pure to factories and builders used internally to purely assemble a UuidInterface
Ref: https://github.com/ramsey/uuid/pull/300#issuecomment-601329450
2020-03-23 11:25:22 +01: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 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 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 5fa4eb4f17 Add fromDateTime() to create version 1 UUIDs from DateTime instances
Fixes #28
2020-02-03 00:48:41 -06:00
Ben Ramsey 268e66aad8 Add static Uuid::uuid2() method 2020-01-18 14:14:47 -06:00
Ben Ramsey 72a2312f62 Support generation of version 2 (DCE Security) UUIDs 2020-01-18 12:14:01 -06:00
Ben Ramsey 8e79ff851a Address Psalm errors 2020-01-18 12:13:56 -06:00
Ben Ramsey 0d7b8c2b7a Update coding style to include PSR-12, among other options
This also includes heavy use of slevomat/coding-standard to apply
various checks to the code, based on maintainer (me) preference.
2020-01-18 12:13:55 -06:00
Massimiliano Arione 5459113b81 add typehints and return types 2020-01-18 12:13:10 -06:00
Bradyn Poulsen 3cf759ad05 Migrate isValid() to Validator and ValidatorInterface
* Maintain backwards compatibility with the former Uuid::isValid() and
  Uuid::VALID_PATTERN
* Remove the assert statements in favor of str_replace and preg_match
* Make the validator a featureset of the factory
* Remove old suggestion about locations of constants
* Remove argument count assertions
* Remove VALID_PATTERN from Uuid
2020-01-18 12:13:08 -06:00
Ben Ramsey 1273cfaf39 Update param typehint to accept UuidInterface as v3/v5 namespace 2019-11-30 14:15:06 -08:00
Ben Ramsey 64ba9a2767 Clean up code according to PhpStorm inspections report 2019-11-30 13:14:52 -08:00
Marco Perone 4b7374129c add annotations for thrown exceptions 2018-07-09 09:04:12 +02:00
Ben Ramsey e6f97dc8ab Add docblocks for classes and interfaces in top-level Ramsey\Uuid namespace 2015-09-27 18:58:50 -05:00
Ben Ramsey e006f669ad Adding common docblock file header 2015-07-15 13:59:52 -05:00
Ben Ramsey d67c3490a8 Change namespace to "Ramsey"; closes #48 2015-04-25 12:11:37 -05:00
Ben Ramsey 2fd86e2cf9 Coding standards fixes 2015-03-21 20:14:43 +00:00
Thibaud Fabre b8fe2e4a91 Extract factory interface & add basic pecl impl 2014-12-17 01:42:57 +01:00