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.
- Concurrent-safe progress storage: new
Verseles\Progressable\Contracts\ProgressStorecontract andStores\CacheProgressStoredefault implementation that update each local entry independently under a cache lock when the cache driver supports atomic locks (Closes #21) setLocalKey()now registers a stable local key when called beforesetOverallUniqueName()
- Default cache-backed storage now uses the new
CacheProgressStore, so per-local updates, renames, and resets are lock-aware when supported setLocalProgress(),setLocalKey(),removeLocalFromOverall(), andresetOverallProgress()keep using customsetCustomSaveData()/setCustomGetData()callbacks unchanged; only the default cache path is routed through the new store
- Laravel 13 Support: Compatible with
illuminate/*^13 packages - Step-based Progress: Track progress by discrete steps
setTotalSteps(int $totalSteps)/getTotalSteps()- Define total stepssetStep(int $step)/getStep()- Set/get current step (auto-calculates percentage)incrementStep(int $amount = 1)- Advance current step
- Estimated Time Remaining:
getEstimatedTimeRemaining()- Local ETA in seconds based on elapsed timegetOverallEstimatedTimeRemaining()- Overall ETA using earliest start time across instances
- Array Export:
toArray()exports the full progress snapshot as an associative array - Metadata Merge:
mergeMetadata(array $metadata)merges metadata without overwriting existing keys
isOverallComplete()now accurately checks each individual instance instead of relying on the rounded average, preventing false positivessetLocalKey()data loss bug when called with the same name as the current keysetLocalKey()now preserves existing target data when renaming keysmakeSureLocalIsPartOfTheCalc()no longer overwrites existing cached progress to 0 when reinstantiating with the samelocalKey
- PHP requirement raised to 8.4
- Added Laravel 12 and PHPUnit 12 support
- Metadata Support: Store additional data with progress
setMetadata(array $metadata)- Set metadata arraygetMetadata()- Get all metadataaddMetadata(string $key, mixed $value)- Add single metadata valuegetMetadataValue(string $key, mixed $default)- Get single metadata value
- Status Messages: Attach status messages to progress
setStatusMessage(?string $message)- Set status messagegetStatusMessage()- Get status message
- Event Callbacks: React to progress changes
onProgressChange(callable $callback)- Called on progress change with(float $new, float $old, static $instance)onComplete(callable $callback)- Called when progress reaches 100% with(static $instance)
- Progress Helpers:
incrementLocalProgress(float $amount = 1)- Increment/decrement progressisComplete()- Check if local progress is 100%isOverallComplete()- Check if overall progress is 100%removeLocalFromOverall()- Remove instance from overall calculation
- Precision Configuration:
setPrecision(int $precision)- Set decimal precisiongetPrecision()- Get current precision- Configurable default precision via
config/progressable.php
- CI/CD Improvements:
- PHPStan static analysis (level 5) with Larastan
- Laravel Pint code style enforcement
- Code coverage with pcov and Codecov integration
- Parallel CI jobs for lint, analyse, and test
- Documentation:
- CHANGELOG.md with full history
- CONTRIBUTING.md with guidelines
- Comprehensive README with API tables
- Codecov badge in README
getLocalProgress()now accepts?int(null uses configured default precision)getOverallProgress()now accepts?int(null uses configured default precision)- Progress data now stores metadata and messages alongside progress value
- Improved test suite with 35 tests and 70+ assertions
- README.md incorrect method names (
updateLocalProgress->setLocalProgress) - README.md incorrect imports (
use Verseles\Progressable->use Verseles\Progressable\Progressable) - Config comment referencing wrong class name (
FullProgress->Progressable) - Added missing return type to
getOverallUniqueName() - Optimized
setLocalKey()to avoid duplicate storage calls
- Initial release with core progress tracking functionality
setOverallUniqueName()- Set progress group identifiersetLocalProgress()- Update instance progressgetLocalProgress()- Get instance progressgetOverallProgress()- Get average progress of all instancesresetLocalProgress()- Reset instance to 0resetOverallProgress()- Clear all progress datasetCustomSaveData()/setCustomGetData()- Custom storage callbackssetTTL()/getTTL()- Cache TTL configurationsetPrefixStorageKey()- Custom cache key prefixsetLocalKey()/getLocalKey()- Custom instance identifiers- Laravel service provider with auto-discovery
- Support for Laravel 11 and 12
- PHP 8.4 requirement