Skip to content

Releases: Jean85/pretty-package-versions

2.1.0

18 Nov 16:42
2.1.0
3c4e5f6
Compare
Choose a tag to compare

Added

  • Add CI tests for PHP 8.4

Changed

  • Bump minimum PHP version to 7.4
  • Bump minimum Composer version to 2.1.0

2.0.6

08 Mar 15:29
2.0.6
f9fdd29
Compare
Choose a tag to compare

Added

2.0.5

08 Oct 21:22
2.0.5
ae547e4
Compare
Choose a tag to compare

Added

  • PHP 8.1 support verified
  • Added the Version::NO_VERSION_TEXT constant to retrieve the string used when no version is available (#41)

Fixed

  • Handle with Version::NO_VERSION_TEXT constant when no version is available due to replaced package (#41)

2.0.4

26 May 08:49
2.0.4
694492c
Compare
Choose a tag to compare

Fixed

  • Handle deprecation of InstalledVersions::getRawData() from Composer 2.0.14 (#39, thanks @BramRoets)

2.0.3

22 Feb 10:53
2.0.3
b2c4ec2
Compare
Choose a tag to compare

Added

  • Added the Version::NO_REFERENCE_TEXT constant to retrieve the string used when no reference is availabled (#38, thanks @DeyV)

1.6.0

04 Feb 16:22
1.6.0
Compare
Choose a tag to compare

Added

  • Add forward compatibility layer for newer methods in 2.0 (see the 2.0 changelog)

2.0.2

03 Feb 09:44
2.0.2
2053f8d
Compare
Choose a tag to compare

Changed

  • Retrieve root package information without indirection (a1cfeec)

Fixed

  • Handle null as reference when constructing Version (#36)

2.0.1

28 Jan 14:07
2.0.1
6d9ae9a
Compare
Choose a tag to compare

This small patch handles replaced and provided packages, so that consumers of this library can handle bad requests gracefully.

Added

  • Add VersionMissingExceptionInterface, and two exceptions implementing it: ProvidedPackageException and ReplacedPackageException

Fixed

  • Throw explicit ProvidedPackageException when asking for the version of a package which is provided (was \TypeError before)
  • Throw explicit ReplacedPackageException when asking for the version of a package which is replaced (was \TypeError before)

2.0.0

14 Jan 21:55
2.0.0
Compare
Choose a tag to compare

This release is aimed to become a bridge for native Composer 2 support. The BC breaks are minimal; if you're using it in a library, you're encouraged to require it with ^1.5 || ^2.0, so that your end users will not be constrained to use a specific Composer version.

Added

  • Version methods added: getReference, getShortReference, getVersionWithShortReference (see table below)

Changed

  • Use Composer 2 API directly to retrieve versions
  • Version methods deprecated; this is a simple rename (commit to reference), to better reflect the meaning of Composer API data; the old methods are preserved but deprecated to reduce breaking changes:
New method Old, deprecated method
Version::getReference() Version::getCommitHash()
Version::getShortReference() Version::getShortCommitHash()
Version::getVersionWithShortReference() Version::getVersionWithShortCommit()

Removed

  • Drop PHP 7.0 support
  • Drop Composer 1 support
  • Drop dependencies
  • [BC BREAK] Constant PrettyVersions::SHORT_COMMIT_LENGTH removed
  • [BC BREAK] Constant Version::SHORT_COMMIT_LENGTH made private
  • [BC BREAK] Version constructor changed arguments: second argument string $version has been split into string $prettyVersion, string $reference

1.5.1

14 Sep 08:44
1.5.1
Compare
Choose a tag to compare

Added

  • PHP 8 support (#28)