From 5ae5993cd8ece261253eb59fc99a2058921bb032 Mon Sep 17 00:00:00 2001 From: naingaunglwin-dev Date: Tue, 9 Dec 2025 18:25:40 +0630 Subject: [PATCH 1/2] docs: add changelog for recent changes --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..947a284 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,23 @@ +# ChangeLog + +## v1.1.0 +### Added +- Implemented `__toString()` method for the `Result` class, allowing instances to be converted to strings (e.g. `"$result"` now returns the calculated value). (PR #1) +- Added new `stop()` method to the timer, supporting stopping: (PR #2) + - a specific timer by ID + - **or** the **most recently started timer** when no ID is provided. +- Added new `watch()` static method to replace `run()` for executing and timing callbacks. (PR #4) +- Added new timer utility methods `isStarted()`, `isStopped()`, and `getActiveTimers()` in `TimeTracker` to inspect active and completed timers. (PR #7) +- Added new timer utility methods `lap()`, `getLaps()`, `pause()`, `resume()`, and `inspect()` in `TimeTracker`. (PR #9) + +### Changed +- Replaced `ramsey/uuid` with native PHP functions (`bin2hex(random_bytes(16))`) for generating random IDs. (PR #3) +- Removed the `ramsey/uuid` dependency as it is no longer required. (PR #3) +- Replaced `STATUS_*` string constants with a dedicated `TimerStatus` enum. (PR #5) + +### Fixed +- Prevent duplicate `stop()` calls in `watch()` by adding an `isStopped()` check in the `finally` block. (RP #8) + +### Deprecated +- Marked `end()` as deprecated. It still works for backward compatibility but will be removed in a future major release. (PR #2) +- Marked `run()` as deprecated. It still works for backward compatibility but will be removed in a future major release. (PR #4) \ No newline at end of file From 2a32ecc86779ddc4ad2f1e2081e6fb920b0848dc Mon Sep 17 00:00:00 2001 From: naingaunglwin-dev Date: Tue, 9 Dec 2025 18:31:26 +0630 Subject: [PATCH 2/2] add today date for version release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 947a284..86ee8fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # ChangeLog -## v1.1.0 +## v1.1.0 - 2025-12-09 ### Added - Implemented `__toString()` method for the `Result` class, allowing instances to be converted to strings (e.g. `"$result"` now returns the calculated value). (PR #1) - Added new `stop()` method to the timer, supporting stopping: (PR #2)