Commit Graph

46 Commits

Author SHA1 Message Date
Ben Ramsey 80a7be00b3 Return Hexadecimal type from TimeConverterInterface::calculateTime() 2020-01-21 23:28:10 -06:00
Ben Ramsey 19f01c7985 No longer set variant/version bits inside the time generator 2020-01-21 16:38:07 -06:00
Ben Ramsey 72a2312f62 Support generation of version 2 (DCE Security) UUIDs 2020-01-18 12:14:01 -06:00
Ben Ramsey c11c023796 Address static analysis issues and add additional tests 2020-01-18 12:13:59 -06:00
Ben Ramsey 4125885862 Add getTime() to TimeProviderInterface and mark currentTime() deprecated 2020-01-18 12:13:58 -06:00
Ben Ramsey 3e81dad348 Fix static analysis issues with tests 2020-01-18 12:13:56 -06:00
Ben Ramsey 12896f06db Use internal exceptions
Fixes #254
2020-01-18 12:13:55 -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
Ben Ramsey 8544df0f40 Remove the MtRandGenerator 2020-01-18 12:13:09 -06:00
Ben Ramsey 05f3f16158 Remove the OpenSslGenerator 2020-01-18 12:13:09 -06:00
Ben Ramsey 506135cc6e Remove SodiumRandomGenerator generator class; it is no longer necessary 2020-01-18 12:13:08 -06:00
SignpostMarv 0030399564 Increase PHPStan levels and update code to resolve issues found 2020-01-18 12:13:08 -06:00
Ben Ramsey 64ba9a2767 Clean up code according to PhpStorm inspections report 2019-11-30 13:14:52 -08:00
Alessandro Minoccheri c4cc058f3d change array declarations 2019-11-30 09:10:09 -08:00
Ben Ramsey 466629a399 Use a high-strength generator by default, when using RandomLibAdapter 2019-11-30 09:10:09 -08:00
karsasmus 2824db17c8 Change library ircmaxell/random-lib to paragonie/random-lib 2019-11-30 09:10:09 -08:00
Ben Ramsey 59c8bb0840 Update the deprecation messages 2018-08-12 09:43:21 -05:00
Ben Ramsey cd92bfa43c Mark SodiumRandomGenerator as deprecated 2018-08-11 21:30:34 -05:00
Ben Ramsey 7397e2f431 Mark MtRandGenerator and OpenSslGenerator as deprecated 2018-08-11 21:23:49 -05:00
Marco Perone 4b7374129c add annotations for thrown exceptions 2018-07-09 09:04:12 +02:00
Marcel Hernandez 76efebe0ac generate random clockSeq with random_int() instead of mt_rand() 2018-01-19 16:17:49 -06:00
Marcel Hernandez 3567caf3f9 fixed off-by-one error on DefaultTimeGenerator 2018-01-19 16:17:36 -06:00
Alex Farcas c7cf416f23 Implemented timestamp first and timestamp last comb generators 2016-03-22 22:04:05 +02:00
Alex Farcas ad6f0747bd Implemented timestamp first and timestamp last comb generators 2016-03-18 16:49:19 +02:00
Ben Ramsey 35247faecf Drop the use of OpenSSL as a fallback and use paragonie/random_compat
Fixes issue #80 for the 3.x series
2016-03-15 11:45:18 -05:00
Ben Ramsey e4e38b4059 Add random generator for the PECL libsodium extension 2016-02-13 20:29:32 -06:00
Emir Beganovic 264a6ceca3 Boolean should be compared strictly 2015-10-07 02:28:06 +02:00
Ben Ramsey 5bf7f5064c Add docblocks for classes and interfaces in Ramsey\Uuid\Generator namespace 2015-09-26 19:06:21 -05:00
Scrutinizer Auto-Fixer f59b447603 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-08-13 15:32:44 +00:00
Aztech 0cd74639cf Enable use of custom TimeGenerator implementations
- Removes now unnecessary `timeConverter` and `timeProvider`
  properties, setters, and getters in both FeatureSet and
  UuidFactory as those are now exclusively used by the default
  TimeGenerator
- Adds a `setTimeGenerator` method on UuidFactory to override the
  default time generator
2015-07-28 22:16:29 +02:00
Ben Ramsey 83367cef97 Use a medium strength generator for ircmaxell/random-lib
As discussed in https://github.com/ramsey/uuid/issues/56
2015-07-28 11:29:43 -05:00
Aztech 8974c76bf6 Refactor TimeGeneratorInterface
- Remove UuidFactory from signature
- Remove setters on UuidFactory to prevent inconsistencies (a new feature set and factory should be used instead)
- Update tests to reflect those changes
2015-07-27 11:14:20 -05:00
Ben Ramsey b7bb2018bf Add time generator for pecl-uuid 2015-07-27 11:14:20 -05:00
Ben Ramsey 8e5c641575 Add random generator for pecl-uuid 2015-07-27 11:14:20 -05:00
Ben Ramsey dfbf8b8098 Abstract time generation into family of TimeGeneratorInterface classes 2015-07-27 11:14:20 -05:00
Ben Ramsey 1bdc10a306 Add RandomBytesGenerator for use with PHP 7. 2015-07-22 21:34:15 +00:00
Ben Ramsey b3ef99a2e9 Move RandomGeneratorInterface and RandomGeneratorFactory to Generator NS 2015-07-16 09:54:04 -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 cc23f64d58 Add COMB generator for use with UUID4 2015-02-07 13:14:58 +01:00
Ben Ramsey 680fd794cb Interfaces should have the suffix "Interface" in their names 2014-11-08 16:27:20 -05:00
Ben Ramsey ebea9b969b Add ircmaxell-RandomLib to the dev dependencies 2014-11-08 16:24:22 -05:00
Thibaud Fabre 84123b2060 Remove all env related logic from factory
Defers all environment related decisions to factory initialization
All behavior is customizable through DI, but all deps are initialized to proper default instances
Removes static factory configuration
2014-11-08 12:41:40 +01:00
Thibaud Fabre fead6f3223 Refactor in the spirit of #1 & #34 2014-10-30 15:16:59 +01:00