Ben Ramsey
76cbc566e2
chore(deps-dev): upgrade PHPStan
2025-05-25 16:52:53 -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
b3c26661ca
Correct capitalization of microsecond
2020-03-04 16:51:46 -06:00
Marco Pivetta
a252f29847
Import used functions and constants via use statement to disallow ambiguity for compiler/static-analysis
...
As documented in https://wiki.php.net/rfc/use_global_elements , the engine (by default) does a local namespace
lookup, then falls back to global namespace when first calling a global function referenced in namespaced code,
unless that function is referenced via fully qualified name (FQN).
By using the FQN, the actual symbol can be looked up at compile-time, both by the PHP engine and by static analysis
tooling, allowing for compiler (in particular) optimizations to replace known hot-path functions with specialized opcodes.
Sadly, no actual benchmark at hand: the improvements can be minimal or massive, depending on where this library is
used (tight loops being most relevant).
2020-02-03 13:15:35 -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
80a7be00b3
Return Hexadecimal type from TimeConverterInterface::calculateTime()
2020-01-21 23:28:10 -06:00
Ben Ramsey
a8d52100de
Support microtime in returned DateTimeInterface instances
...
Fixes #90 and supersedes #93 .
2020-01-19 23:21:48 -06:00
Ben Ramsey
c11c023796
Address static analysis issues and add additional tests
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
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
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
Julian Ecknig
4de1348099
Add GmpConverter and GmpTimeConverter
2020-01-18 12:13:09 -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
Ben Ramsey
64ba9a2767
Clean up code according to PhpStorm inspections report
2019-11-30 13:14:52 -08:00
Andreas Möller
7ff6fff06d
Fix: Move tests one up
2016-09-15 08:31:27 +02:00
Ben Ramsey
f5e96b6af7
Restructure tests
2015-10-03 10:59:44 -05:00
Ben Ramsey
d67c3490a8
Change namespace to "Ramsey"; closes #48
2015-04-25 12:11:37 -05:00
Ben Ramsey
cd2d09c356
Introduce Converter namespace and move Number and Time classes into it
2014-11-08 14:43:09 -05:00