Releases: ingenerator/php-utils
Releases · ingenerator/php-utils
Improve request logging
What's Changed
Full Changelog: v1.13.0...v1.14.0
Add DateTimeImmutableFactory from Ymdhis support
What's Changed
Full Changelog: v1.12.0...v1.13.0
Statsite metrics agent
- Extend MetricsAgent to handle additional metric types
- Add StatsiteAgent capable of formatting and sending UDP messages to statsite
- Add DateTimeDiff::microsBetween() to calculate the exact number of microseconds between two DateTimeImmutable values without any risk of floating point precision errors
Support PHP 8
- support PHP8
Thin wrapper for database transactions
Merge pull request #35 from ingenerator/1.x-feat-transaction-wrapper Add thin interface / wrapper for running code in a database transaction
Metrics interface and OperationTimer
- Barebones metrics interface which will be fleshed out in a further release
- OperationTimer for capturing timer metrics
- Correct @license tags
StoppedMockClock has microseconds, ObjectPropertyRipper
- [CAUTION] StoppedMockClock now stores / returns fractional seconds for consistency with real DateTimeImmutable PHP DateTime objects now always carry microseconds - the StoppedMockClock should therefore always include them in the times it accepts and returns. There is a possibility this will cause some strict equality checks in unit tests to fail. Not treated as a package breaking release as it only affects testcase code.
- Add ObjectPropertyRipper::ripAll to grab all variables (from simple objects with no private props in parent classes).
High-precision time helpers, improved MockMutexWrapper
- Add DateTimeImmutableFactory and DateString methods for dealing with microsecond-precision date/time values
- Improve test assertion API on the MockMutexWrapper
Support PHP 7.4
Merge pull request #28 from ingenerator/use-new-setcookie-sig Require PHP7.4 and use new setcookie() signature
Stackdriver logging, device ID's, mutex wrapper stable release
Unchanged stable release from beta3
- Init the DeviceIdentifier to a fixed value in the CLI environment without setting any cookies, to prevent
errors if the process has already sent output. - Add MutexWrapper with Mock and Db (mysql) backed implementations for preventing concurrent executions
of code. - [BREAKING] Removed the $session_id parameter from DefaultLogMetadata::requestTrace - use the new
DefaultLogMetadata::deviceIdentityLazy method instead to capture the device ID into the logs.
The session ID was removed because reading from $_COOKIE does not provide a value on the user's first
request, and other methods (e.g. session_id()) may not give an accurate value if the session cookie name
is customised but the session has not been started at the time of logging. - Add class to assign users a device ID cookie and provide the value for logging
- Add class to wrap accessing / setting / deleting cookies for injectability and testability
- Add helper method to get a DateTimeImmutable from a unix timestamp, in current timezone
- Add StackdriverApplicationLogger and dependencies