17 Commits

Author SHA1 Message Date
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 37f72746a7 Remove checks that are no longer necessary 2020-01-18 12:13:59 -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
Ben Ramsey 5d7ee63f1c Update dev requirements and test suite for PHP 7+ only 2020-01-18 12:13:07 -06:00
Martin Hujer f3e0fed2d7 Drop remnants of HHVM from tests
It was removed from Travis in c479cdd42f
2019-11-30 09:10:09 -08:00
peter279k 8fab36d995 Use class-based PHPUnit namespace 2018-04-25 18:43:33 +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
Aztech 896cd9c4e2 Use GUID codec in all cases as it is now endianness independant 2015-08-14 22:43:58 +02:00
Aztech 958468d95b Detect host endianness when building codec 2015-08-14 22:24:16 +02:00
Ben Ramsey b375d1de2b Separate uuid CLI tool into separate project
Closes #52
2015-06-21 19:37:32 -05:00
Ben Ramsey de02e532b2 Separate Doctrine\UuidTupe into an external library
Closes #51
2015-06-21 18:05:49 -05:00
Ben Ramsey d67c3490a8 Change namespace to "Ramsey"; closes #48 2015-04-25 12:11:37 -05:00
Ben Ramsey c43be02bd9 Upgraded to PSR-4 autoloading 2014-02-21 18:35:01 -06:00