[2.2.0] - 2025-01-10
Important
Initially, in the previous 2.1.0
release, several functions were deprecated (see Deprecated
under 2.1.0
here).
After much thought on the direction I want this library to move in, I am reversing my decision to deprecate the Array and Temperature functions mentioned.
Added
Dates::formatDifferenceOutput()
a private function to handle formatting the output forDates::timeDifference()
Dates::INTERVAL_UNITS
constant.- Added new parameter
$includeBcZones
toDates::timezoneInfo()
andDates::validTimezone()
- If true, includes all backwards compatible (and outdated) timezones.
- Added
Psalm
andRectorPHP
as dev-dependencies.
Changed
Arrays::flatten()
,Arrays::mapDeep()
, and all the temperature related functions inConversions
are no longer deprecated.- New tests added for the
Image
class. Still a work in progress; working toward no 'codeCoverageIgnore'. Dates::timeDifference()
logic was changed and a new parameter$extendedOutput
added.- If this parameter is
false
(default), it returns the same output as usual. - If this parameter is
true
, it formats the output with available non-zeroDateInterval
units. For example: 2 days 2 hours 20 minutes old.
- If this parameter is
- BC BREAK:
Dates::timeDifference()
output no longer uses '(s)'. Will add 's' if greater than one. Arrays
class has gone through a bit of a refactor:Arrays::mapDeep()
updated to avoid circular references when dealing with objects.- New PHPUnit tests added to cover
mapDeep()
as well.
- New PHPUnit tests added to cover
- Updated the
Arrays
class for psalm/phpstan templates/generics.- Still something I am admittedly not highly experienced with, so it may look/feel a little wonky. Going to improve it as I can.
- Optimized the
Conversion::haversineDistance()
method. - Refactored unit tests.
- Changes throughout to make fixes and improvements reported by Psalm.
Full Changelog: v2.1.0...v2.2.0