Skip to content

Conversation

@insign
Copy link
Contributor

@insign insign commented Nov 23, 2025

No description provided.

- Add PHPStan (level 5) for static analysis with Larastan
- Add Laravel Pint for code style enforcement
- Fix README.md incorrect method names and imports
- Fix config comment referencing wrong class name
- Add missing return type to getOverallUniqueName()
- Optimize setLocalKey() to avoid duplicate storage calls
- Improve test coverage with new tests:
  - UniqueNameAlreadySetException test
  - setLocalKey() data preservation test
  - makeSureLocalIsPartOfTheCalc() test
  - Progress precision test
  - Empty progress data test
- Add test isolation with setUp() and unique test IDs
- Update CI workflow with parallel lint, analyse, and test jobs
- Add composer scripts: lint, lint:test, analyse
New Methods:
- incrementLocalProgress(float $amount = 1) - Increment/decrement progress
- isComplete() - Check if local progress is 100%
- isOverallComplete() - Check if overall progress is 100%
- removeLocalFromOverall() - Remove instance from overall calculation
- setPrecision(int) / getPrecision() - Configure decimal precision

Configuration:
- Add 'precision' option to config/progressable.php
- getLocalProgress() and getOverallProgress() now use configured precision

Documentation:
- CHANGELOG.md - Document all changes
- CONTRIBUTING.md - Contribution guidelines
- README.md - Complete API documentation with tables

CI/CD:
- Add code coverage with pcov
- Integrate with Codecov for coverage reports

Tests:
- Add 9 new tests for new functionality (26 total)
- 51 assertions covering all features
New Features:
- Metadata support: setMetadata(), getMetadata(), addMetadata(), getMetadataValue()
- Status messages: setStatusMessage(), getStatusMessage()
- Event callbacks: onProgressChange(), onComplete()
- Progress data now stores metadata and messages alongside progress value

Documentation:
- Add Codecov and PHP version badges to README
- Document all new methods with examples
- Update CHANGELOG for v2.0.0 release

Tests:
- Add 8 new tests for metadata and callbacks
- Total: 34 tests with 75 assertions

CI:
- Fix PHPStan unmatched ignore pattern warning
PHPUnit 12 requires explicit source configuration for code coverage.
Added phpunit.xml with <source> element pointing to src directory.
Also added .phpunit.cache/ to .gitignore.
@insign insign merged commit 697cce3 into main Nov 23, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants