Skip to content

6.0.0

Latest

Choose a tag to compare

@xaevik xaevik released this 26 Dec 12:15
· 9 commits to main since this release
Immutable release. Only release title and notes can be modified.
6.0.0
834c8a1

What's Changed

⚠️ Breaking Changes

  • Minimum PHP version increased from 8.1 to 8.2
  • Removed markrogoyski/math-php dependency - replaced with pure PHP implementation

✨ Performance & Architecture Improvements

CUID Generation:

  • CUID value now generated in constructor and cached for zero-overhead repeated access
  • Previously computed on-demand, now provides predictable performance characteristics

Fingerprint Refactor:

  • Changed from array-based to binary string storage (SHA3-512 hash)
  • Added singleton protections (__clone, __wakeup) to prevent misuse
  • Platform-specific hostname length constants for Windows/Unix systems
  • Improved documentation and type safety

Counter Improvements:

  • Now uses PHP 8.2's Random\Randomizer with Secure engine
  • Automatic bias-free sampling (eliminates manual rejection sampling)
  • Cleaner, more maintainable implementation

Base Conversion:

  • New Utils class with optimized base36 conversion algorithm
  • Uses intermediate large base (100 million) for efficient arithmetic
  • Pure PHP implementation, zero external dependencies
  • GMP still recommended for optimal performance

📚 Documentation

  • Added comprehensive CONTRIBUTING.md with development guidelines
  • Updated README.md with improved documentation
  • Enhanced inline documentation across core classes

🔧 Maintenance

  • Stronger composer cache key for CI
  • Updated Renovate configuration
  • Dependency updates via Renovate bot

Full Changelog: 5.2.0...6.0.0