Eloquent KeyGen v1.2.0
This release modernizes Eloquent KeyGen’s PHP and Laravel compatibility, improves sequence-resolver reliability, and ensures Snowflake IDs are generated only when models are created.
Breaking changes
- The minimum runtime is now 64-bit PHP 8.1.
- Supported Laravel versions are now Laravel 10 through Laravel 13.
- godruoyi/php-snowflake 3.2 or newer is required.
- PrimaryKeyGenerator::generate() now declares a string return type.
- Applications overriding this method must add a compatible return type.
Improvements
- Generate Snowflake IDs during Eloquent’s creating event instead of saving.
- New records continue receiving generated IDs automatically.
- Updating an existing model no longer invokes ID-generation behavior.
- Create the default file-lock directory through Laravel’s filesystem service.
Compatibility and tooling
Add compatibility coverage for:
- PHP 8.1 with Laravel 10
- PHP 8.2 with Laravel 11 and 12
- PHP 8.3–8.5 with Laravel 13
- Upgrade PHPStan to 2.2 with strict rules and level 8 analysis.
- Support PHPUnit 10 through 13.
- Add PCOV coverage generation and Codecov integration.
- Add focused tests for sequence-resolver registration, filesystem behavior, and model ID lifecycle.