Ben Ramsey
5d1f106882
Rename Validator\Validator to Validator\GenericValidator
2020-01-18 12:14:00 -06:00
Ben Ramsey
2ad77d9ca7
Remove CalculatorInterface as a Uuid constructor parameter
2020-01-18 12:14:00 -06:00
Ben Ramsey
52f764c284
Change first constructor param in Uuid to Rfc4122\FieldsInterface
2020-01-18 12:14:00 -06:00
Ben Ramsey
360261d617
Deprecate all the fields methods on UuidInterface and Uuid
2020-01-18 12:14:00 -06:00
Ben Ramsey
10624f64a1
Change return type of Uuid::getFields() to FieldsInterface
2020-01-18 12:14:00 -06:00
Ben Ramsey
c11c023796
Address static analysis issues and add additional tests
2020-01-18 12:13:59 -06:00
Ben Ramsey
26a02a93db
Restore ExpectedBehaviorTest as close to 3.x version as possible
2020-01-18 12:13:59 -06:00
Ben Ramsey
d7c6f28761
Clean up test names in FeatureSetTest
2020-01-18 12:13:59 -06:00
Ben Ramsey
f5cfb5f57d
Split known v3 and v5 UUID tests into providers
2020-01-18 12:13:59 -06:00
Ben Ramsey
deb888c4a3
Set floating-point precision for tests to "14"
2020-01-18 12:13:59 -06:00
Ben Ramsey
37f72746a7
Remove checks that are no longer necessary
2020-01-18 12:13:59 -06:00
Ben Ramsey
c80ad2606f
Deprecate degraded UUIDs; they are no longer necessary
2020-01-18 12:13:59 -06:00
Ben Ramsey
d543895369
Return string integers instead of int integers
2020-01-18 12:13:58 -06:00
Ben Ramsey
4125885862
Add getTime() to TimeProviderInterface and mark currentTime() deprecated
2020-01-18 12:13:58 -06:00
Ben Ramsey
1e26916bf6
Add getTimestamp() and getClockSeq() to FieldsInterface
2020-01-18 12:13:58 -06:00
Ben Ramsey
d665ec8e88
Provide a fallback time converter in case of integers too big
2020-01-18 12:13:58 -06:00
Ben Ramsey
63942c393d
Remove Gmp converters; the generic converters are preferred
2020-01-18 12:13:58 -06:00
Ben Ramsey
3546a86f7d
Deprecate BigNumberConverter and BigNumberTimeConverter
2020-01-18 12:13:58 -06:00
Ben Ramsey
9b2c93c5b5
Add generic converters for numbers and time
2020-01-18 12:13:58 -06:00
Ben Ramsey
cd03f39e9c
Depend on brick/math for arbitrary-precision math
2020-01-18 12:13:58 -06:00
Ben Ramsey
07fc6b8f6f
Add Hexadecimal, IntegerValue, and Time types
2020-01-18 12:13:57 -06:00
Ben Ramsey
668b6ab9a2
Use the codec to encode to binary when using Uuid::getBytes()
2020-01-18 12:13:57 -06:00
Ben Ramsey
4d1db4d090
Clean up class naming conventions
2020-01-18 12:13:57 -06:00
Ben Ramsey
ebaa04a6b2
Improve coverage and unit tests for fields, GUIDs, and nonstandard UUIDs
2020-01-18 12:13:57 -06:00
Ben Ramsey
70eace9086
Introduce separate classes to handle nonstandard UUIDs
2020-01-18 12:13:57 -06:00
Ben Ramsey
d6ed9b3832
Introduce separate class support for GUIDs
2020-01-18 12:13:57 -06:00
Ben Ramsey
d4dd45e908
Apply fields functionality to Uuid class
2020-01-18 12:13:57 -06:00
Ben Ramsey
24311f2925
Introduce FieldsInterface and base classes for fields support
2020-01-18 12:13:56 -06:00
Ben Ramsey
3e81dad348
Fix static analysis issues with tests
2020-01-18 12:13:56 -06:00
Ben Ramsey
b7f9dc5010
Check for RFC 4122, version 1 UUIDs with OrderedTimeCodec
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
Ben Ramsey
0721630ba4
Refactor converters to uniformly accept and return string values
2020-01-18 12:13:09 -06:00
Ben Ramsey
81f0f9a9b4
Clean-up tests and use PHPStan max level for tests
2020-01-18 12:13:09 -06:00
Carlos Barrero
650cb9f545
Change getDateTime to DateTimeInterface
2020-01-18 12:13:09 -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
Julian Ecknig
4de1348099
Add GmpConverter and GmpTimeConverter
2020-01-18 12:13:09 -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
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
Martin Hujer
ca2629767d
Require phpstan and correct issues found up to level 2
...
* issues found by phpstan L0
* issues found by phpstan L1
* issues found by phpstan L2 in src/
* issues found by phpstan L2 in tests/
2020-01-18 12:13:08 -06:00
Ben Ramsey
5d7ee63f1c
Update dev requirements and test suite for PHP 7+ only
2020-01-18 12:13:07 -06:00
Martin Hujer
049d5acf7a
Use ::class constants where possible
...
It helps with refactorings and static analysis, because you can easily
tell if the class is missing or not.
2020-01-18 12:13:07 -06:00
Jildert Miedema
225eb3b4c1
Set minimum version to PHP 5.6 and use PHP 5.5 style ::class constants
2020-01-18 12:13:07 -06:00
Ben Ramsey
eb1645bc72
Add behavior test for TimestampFirstCombCodec
2020-01-13 10:49:53 -06:00
Ben Ramsey
da6fcde177
Add tests to ensure consistent behavior from 3.x to 4.x
2020-01-08 16:47:00 -06:00
Ben Ramsey
b39ec78f6e
Check whether sysfs is readable before attempting to read it
...
Fixes #260
2019-12-17 02:01:14 -06:00
Ben Ramsey
2ed5a60a61
Fix "access array offset on value of type null" errors
2019-12-06 21:24:32 -08:00
Ben Ramsey
e1761af875
Disable deprecation messages for now
2019-12-06 17:55:09 -08:00