Skip to content

Latest commit

 

History

History
90 lines (68 loc) · 3.45 KB

CHANGELOG.md

File metadata and controls

90 lines (68 loc) · 3.45 KB

Changelog

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.

[1.1.0] - 2024-12-10

Added

  • 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 and Murmur3 based hashers.
  • Added tests/BenchmarkTest back, which was previously removed in the 1.0.0 release.

Changed

  • Improved the PHPBench benchmark in tests/Bench and reduced to one class.

Removed

  • 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

Note: This is not a drop-in replacement for flexihash as there are various BC breaks.

Added

  • Added a XXH32 based hasher. This brings the available hashers to:
    • Crc32Hasher
    • Md5Hasher
    • Xxh32Hasher
  • Added benchmarks for the Crc32 and Xxh32 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 output
    • friendsofphp/php-cs-fixer - to check and/or fix code based on my personal coding standards
    • phpbench/phpbench - to run benchmarks found in tests/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

Changed

  • 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 to TargetException and moved to Esi\ConsistentHash\Exception namespace
    • TargetException now extends \RuntimeException instead of \Exception
    • Added static methods that handle creating the exception and message

Removed

  • Removed TravisCI and Coveralls
  • Removed tests/BenchmarkTest in favor of just using a slimmed down benchmark via PHPBench