Skip to content

Releases: ericsizemore/utility

v2.1.0

23 Apr 04:54
Compare
Choose a tag to compare

[2.1.0] - 2024-04-23

This release focuses on setting up the future of the library. No new features or functionality has been added in this release.

Added

  • Added mend.io's Renovate to workflow
  • Added Esi\Clock to dependencies, updated Esi\Utility\Dates accordingly.
  • Added a code of conduct.
  • Added a backwards compatibility promise.

Changed

  • Reformatted this CHANGELOG to be more in line with the Keep a Changelog format.
  • Implemented various PHPCS-Fixer recommendations.
  • Updated coding style via .php-cs-fixer.dist.php, and as a result, implemented those changes throughout the library.
  • Changed the header being used for all files to something smaller, and more simple.
  • Bumped version requirement for the PHPUnit dev-dependency to 11.1
  • Updated tests github workflow to add uploading coverage data to Codecov.io
  • Made all utility classes abstract as they never need instantiation.
  • Separate contributing information into its own file.
    • Updated contributing information and guidelines.

Deprecated

The next major release, v3, will move to PHP 8.3 as a minimum requirement.

  • Arrays::flatten()'s current signature and functionality will change in the next major release (v3.0)
  • Arrays::mapDeep()'s current signature and functionality will change in the next major release (v3.0)
    • The functionality of mapping the properties of an object will likely be moved to its own utility class/function.
  • Arrays::validJson() will be removed in the next major release (v3.0)
  • All of the temperature related functions in Conversions:
    • Current signature and functionality deprecated, will be changed in 3.0

Removed

  • Removed deprecated Arrays::exists
  • Removed all instances of @phpstan-ignore-* opting to instead use a baseline for PHPStan (phpstan-baseline.neon)

GitHub Log

What's Changed
  • Configure Renovate by @renovate in #5
  • Update codecov/codecov-action action to v4.1.1 by @renovate in #7
  • Update codecov/codecov-action action to v4.2.0 by @renovate in #8
  • Update dependency phpunit/phpunit to v11.1.1 by @renovate in #9
  • Update codecov/codecov-action action to v4.3.0 by @renovate in #10
  • Update dependency phpunit/phpunit to v11.1.2 by @renovate in #11
  • Update dependency friendsofphp/php-cs-fixer to v3.54.0 by @renovate in #12
New Contributors

Full Changelog: v2.0.0...v2.1.0

v2.0.0

04 Mar 04:15
Compare
Choose a tag to compare

Full Changelog: v1.3.0...v2.0.0 & https://github.com/ericsizemore/utility/blob/master/CHANGELOG.md

Some Highlights:

2.0.0 (2024-03-04)

  • Utility has undergone a complete restructuring.
  • src/Utility/Utility.php no longer exists. The class has been broken down into smaller classes or "components":
    • src/Utility/Arrays.php
    • src/Utility/Conversion.php
    • src/Utility/Dates.php
    • src/Utility/Environment.php
    • src/Utility/Filesystem.php
    • src/Utility/Image.php
    • src/Utility/Numbers.php
    • src/Utility/Strings.php
  • Made a great improvement in code coverage/testing
  • Effort to improve documentation, which can be found in docs/ or online here

v1.3.0

12 Dec 00:43
Compare
Choose a tag to compare

1.3.0 (2023-12-11)

  • currentUrl() no longer has any parameters, and just returns the URL string.
    • currentUrl(bool $parse = false) is now just currentUrl()
    • Just run parse_url(Utility::currentUrl()) if that functionality is needed.
  • serverHttpVars() deprecated, just use getallheaders() instead.
    • Added ralouphie/getallheaders as a polyfill, for situations where the SAPI is not Apache
    • serverHttpVars() will just return the getallheaders() output
  • Removed deprecated statusHeader()
  • Code cleanup per PHPCS and PHPScrutinizer
    • Small refactoring of some functions, such as currentUrl and isReallyWritable
  • Attempt at increasing test coverage.
  • Further cleanup to try and adhere to PSR-12.
    • Adding information into README.md for PHPDoc related guidelines, in an effort
      to adhere to PSR-5 and PSR-19.

Full Changelog: v1.2.0...v1.3.0

v1.2.0

23 Sep 02:42
Compare
Choose a tag to compare

1.2.0 (2023-09-22)

  • Code cleanup per PHPStan (level: 9, strict, bleeding edge)
  • New function arrayInterlace
  • doesContain() and doesNotContain() now uses the PHP 8 native str_contains() function.
    • No longer relies on mbstring for these two functions, as it does not appear to be necessary.
    • However, you can pass true to the $multibyte parameter to use mbstring
    • New signature: (string $haystack, string $needle, bool $insensitive = false, bool $multibyte = false)
  • beginsWith() and endsWith() now uses the PHP 8 native str_starts_with() and str_ends_with() functions.
    • No longer relies on mbstring for these two functions, as it does not appear to be necessary.
    • However, you can pass true to the $multibyte parameter to use mbstring
    • New signature: (string $haystack, string $needle, bool $insensitive = false, bool $multibyte = false)
  • New functions for temperature conversions:
    • fahrenheitToCelsius, celsiusToFahrenheit, celsiusToKelvin, kelvinToCelsius, fahrenheitToKelvin, kelvinToFahrenheit
    • fahrenheitToRankine, rankineToFahrenheit, celsiusToRankine, rankineToCelsius, kelvinToRankine, rankineToKelvin
  • Reworked arrayFlatten, now has new paramater $prepend
  • statusHeader() is now deprecated, you can use PHP's built-in http_response_code function instead.
  • validJson() should now return properly
  • Initial implementation of PHPUnit and the testing suite.

v1.1.2

17 Aug 14:16
Compare
Choose a tag to compare

1.1.2 (2023-08-17)

  • Version bump
  • Minor code cleanup

v1.1.1

11 Aug 23:49
Compare
Choose a tag to compare

1.1.1 (2023-08-11)

  • Version bump
  • Cleaning up issues per PHPStan

v1.1.0

13 Jul 22:54
Compare
Choose a tag to compare

1.1.0 (2023-06-24)

  • Version bump
  • Bumped PHP version requirement to 8.2
  • Updated composer.json
  • FIX: Minor documentation improvements.
  • FIX: Minor code improvements.
  • BC BREAK: randomBytes, randomInt, randomString and guid now throw \Random\RandomException

What's Changed

  • Add license scan report and status by @fossabot in #4

New Contributors

Full Changelog: v1.0.3...v1.1.0

1.0.3

04 Jun 00:05
e2f2dbd
Compare
Choose a tag to compare

1.0.3 (2023-06-03)

  • Updated copyright year(s) and version bump.
  • Bumped PHP version requirement.
  • Updated composer.json
  • FIX: Minor documentation improvements.
  • FIX: Minor code improvements.
  • FIX: Some functions not defined/used properly.