Skip to content

Releases: ingenerator/php-utils

Improve request logging

19 Nov 14:44
c987540

Choose a tag to compare

What's Changed

  • Improve request logging - memory usage & max user-agent length by @acoulton in #39

Full Changelog: v1.13.0...v1.14.0

Add DateTimeImmutableFactory from Ymdhis support

04 Nov 07:42
99817e7

Choose a tag to compare

What's Changed

  • Add 'Y-m-d H:i:s' support to DateTimeImmutableFactory by @craig410 in #38

Full Changelog: v1.12.0...v1.13.0

Statsite metrics agent

05 Oct 10:11
9f07785

Choose a tag to compare

  • 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

19 Apr 18:12
9ecc644

Choose a tag to compare

  • support PHP8

Thin wrapper for database transactions

09 Apr 20:56
f997ccb

Choose a tag to compare

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

16 Mar 17:50
ea2e1b1

Choose a tag to compare

  • Barebones metrics interface which will be fleshed out in a further release
  • OperationTimer for capturing timer metrics
  • Correct @license tags

StoppedMockClock has microseconds, ObjectPropertyRipper

15 Mar 11:59
eb52ba7

Choose a tag to compare

  • [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

16 Nov 13:26
46657be

Choose a tag to compare

  • Add DateTimeImmutableFactory and DateString methods for dealing with microsecond-precision date/time values
  • Improve test assertion API on the MockMutexWrapper

Support PHP 7.4

02 Nov 11:00
7fd17a3

Choose a tag to compare

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

02 Nov 10:58
4aa2f05

Choose a tag to compare

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