Ben Ramsey
6bd7221484
Clean up docblocks, code, and note new deprecations
...
The following are deprecated:
* `Ramsey\Uuid\Codec\OrderedTimeCodec`
* `Ramsey\Uuid\Codec\TimestampFirstCombCodec`
* `Ramsey\Uuid\Codec\TimestampLastCombCodec`
* `Ramsey\Uuid\Generator\CombGenerator`
2025-05-31 17:20:12 -05:00
Ben Ramsey
f1891183f9
Upgrade PHPStan
2022-08-05 14:46:56 -05: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
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
Bilge
7947413a76
Use assertSame instead of assertEquals.
2020-08-23 13:53:19 +01: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
4963f2320a
Optimize codec algorithms
2020-01-21 22:17:32 -06:00
Ben Ramsey
bf237a1962
Change UuidBuilderInterface::build() to accept bytes instead of fields
2020-01-21 15:49:18 -06:00
Ben Ramsey
0b64d6d995
Optimize how OrderedTimeCodec rearranges bytes and validates instances
2020-01-18 12:14:01 -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
668b6ab9a2
Use the codec to encode to binary when using Uuid::getBytes()
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
b7f9dc5010
Check for RFC 4122, version 1 UUIDs with OrderedTimeCodec
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
Ben Ramsey
81f0f9a9b4
Clean-up tests and use PHPStan max level for tests
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
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 Peachey
dbb9a8b6d1
Changes all usage in Tests of getMock with getMockBuilder.
2017-10-17 12:46:25 +02:00
Andreas Möller
7ff6fff06d
Fix: Move tests one up
2016-09-15 08:31:27 +02:00