All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Added Fnv1-a and Murmur3 based hashers. This brings the available hashers to:
Crc32Hasher
Fnv1AHasher
Md5Hasher
Murmur3Hasher
Xxh32Hasher
- Added unit tests for the
Fnv1-a
andMurmur3
based hashers. - Added
tests/BenchmarkTest
back, which was previously removed in the 1.0.0 release.
- Improved the PHPBench benchmark in
tests/Bench
and reduced to one class.
- With the improvement to
tests/Bench/LookupBench
, the following were no longer needed:tests/Bench/LookupBenchCrc32
tests/Bench/LookupBenchFnv1A
tests/Bench/LookupBenchMurmur3
tests/Bench/LookupBenchXxh32
1.0.0 - 2024-12-04
This library is based on a fork of flexihash/flexihash v3.0.0 by
- Paul Annesley paul@annesley.cc
- Dom Morgan dom@d3r.com
Note: This is not a drop-in replacement for flexihash as there are various BC breaks.
- Added a XXH32 based hasher. This brings the available hashers to:
Crc32Hasher
Md5Hasher
Xxh32Hasher
- Added benchmarks for the
Crc32
andXxh32
based hashers, as the original benchmark was using the MD5 hasher. Adds:tests/Bench/LookupBenchCrc32
tests/Bench/LookupBenchXxh32
- New dev dependencies:
esi/phpunit-coverage-check
- to check code coverage percentage based on PHPUnit's clover outputfriendsofphp/php-cs-fixer
- to check and/or fix code based on my personal coding standardsphpbench/phpbench
- to run benchmarks found intests/Bench
- PHPStan for static analysis
phpstan/extension-installer
phpstan/phpstan
phpstan/phpstan-deprecation-rules
phpstan/phpstan-phpunit
phpstan/phpstan-strict-rules
phpunit/phpunit
- to perform unit tests- Psalm for static analysis
psalm/plugin-phpunit
vimeo/psalm
- Updated namespace to
Esi\ConsistentHash
- Bumped minimum PHP version to 8.2
- Updated throughout to add proper parameter, property, and return types
- Updated throughout per coding standards via PHP-CS-Fixer (PSR-12/PER-CS)
- Updated throughout to add psalm and phpstan extended types to docblocks
- Various fixes throughout to resolve issues reported by both PHPStan and Psalm
- Updated composer.json to add keywords, support information, and scripts
- Normalized composer.json
- Performance enhancements
- Changed
Exception
class toTargetException
and moved toEsi\ConsistentHash\Exception
namespaceTargetException
now extends\RuntimeException
instead of\Exception
- Added static methods that handle creating the exception and message
- Removed TravisCI and Coveralls
- Removed tests/BenchmarkTest in favor of just using a slimmed down benchmark via PHPBench