PackageTrack
Sign in Get early access

jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

2.1.1 334M downloads/mo #130 most downloaded on composer Jean85/pretty-package-versions

What this package is like to depend on

Last release 1 years ago

19 Mar 2025

Ships unpredictably

gaps range from 2 weeks to 2.4 years

Most releases are documented

notes for 17 of 20 stable releases

Nothing withdrawn

no release was ever pulled

9 years old

20 releases · first in 2017

0 releases in the last 12 months

see the full history below

Release timeline

20 releases · Jul 2017 to Mar 2025
2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 20
  1. 2.1.1 19 Mar 2025
    Release notes

    Fixed

    • Improve detection of tagged version (handles edge cases like RC1, alpha-2, etc.)
    • Do not truncate {no reference} in short reference when no reference is found
    Open source →
    Release notes

    Fixed

    • Improve detection of tagged version (handles edge cases like RC1, alpha-2, etc.)
    • Do not truncate {no reference} in short reference when no reference is found
    Open source →
  2. 2.1.0 18 Nov 2024
    Release notes

    Added

    • Add CI tests for PHP 8.4

    Changed

    • Bump minimum PHP version to 7.4
    • Bump minimum Composer version to 2.1.0
    Open source →
    Release notes

    Added

    • Add CI tests for PHP 8.4

    Changed

    • Bump minimum PHP version to 7.4
    • Bump minimum Composer version to 2.1.0
    Open source →
  3. 2.0.6 08 Mar 2024
    Release notes

    Added

    Open source →
    Release notes

    Added

    • PHP 8.2 and 8.3 support verified
    • Optimized package distribution via .gitattributes (#44 #46, thanks @villfa @VincentLanglet)
    Open source →
  4. 2.0.5 08 Oct 2021
    Release notes

    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)
    Open source →
    Release notes

    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)
    Open source →
  5. 2.0.4 26 May 2021
    Release notes

    Fixed

    • Handle deprecation of InstalledVersions::getRawData() from Composer 2.0.14 (#39, thanks @BramRoets)
    Open source →
    Release notes

    Fixed

    • Handle deprecation of InstalledVersions::getRawData() from Composer 2.0.14 (#39, thanks @BramRoets)
    Open source →
  6. 2.0.3 22 Feb 2021
    Release notes

    Added

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

    Added

    • Added the Version::NO_REFERENCE_TEXT constant to retrieve the string used when no reference is available (#38, thanks @DeyV)
    Open source →
  7. 2.0.2 03 Feb 2021
    Release notes

    Changed

    • Retrieve root package information without indirection (a1cfeec)

    Fixed

    • Handle null as reference when constructing Version (#36)
    Open source →
    Release notes

    Changed

    • Retrieve root package information without indirection (a1cfeec)

    Fixed

    • Handle null as reference when constructing Version (#36)
    Open source →
  8. 2.0.1 28 Jan 2021
    Release notes

    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)
    Open source →
    Release notes

    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)
    Open source →
  9. 2.0.0 14 Jan 2021
    Release notes

    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
    Open source →
    Release notes

    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
    Open source →
  10. 1.6.0 04 Feb 2021
    Release notes

    Added

    • Add forward compatibility layer for newer methods in 2.0 (see the 2.0 changelog)
    Open source →
    Release notes

    Added

    • Add forward compatibility layer for newer methods in 2.0 (see the 2.0 changelog)
    Open source →
  11. 1.5.1 14 Sep 2020
    Release notes

    Added

    • PHP 8 support (#28)
    Open source →
  12. 1.5.0 23 Jun 2020

    Nothing published for this version

  13. 1.4.0 28 Apr 2020

    Nothing published for this version

  14. 1.3.0 24 Apr 2020

    Nothing published for this version

  15. 1.0.3 30 Nov 2017
    Release notes

    Changed

    • Require at least ocramius/package-versions 1.2 to fix root package version (see #3)

    Known issues

    • Use this package with Composer >= 1.5.3 to fix root package version when in version-branch (see #4)
    Open source →
  16. 1.0.2 06 Sep 2017
    Release notes

    Added

    • Add PHP 7.2 to the build matrix for official support

    Changed

    • Require at least ocramius/package-versions 1.1.3 to avoid issues when removing the package (see this issue)
    Open source →
  17. 1.0.1 06 Jul 2017
    Release notes

    Changed

    • Make the package lightweight thanks to the .gitattributes file (#1)
    Open source →
  18. 1.2 13 Jun 2018
    Release notes

    Added

    • Add Version::__getShortCommitHash() method (see #8, thanks @emodric)
    Open source →
  19. 1.1 21 Jan 2018
    Release notes

    Added

    • Add Version::__toString() method (see #5)
    Open source →
  20. 1.0 06 Jul 2017
    Release notes

    First release

    Changed

    • Jean85\PrettyVersions wraps the PackageVersions\Versions class and returns a Jean85\Version object
    • The Jean85\Version has these methods available:
      • public function getPrettyVersion(): string
      • public function getFullVersion(): string
      • public function getVersionWithShortCommit(): string
      • public function getPackageName(): string
      • public function getShortVersion(): string
      • public function getCommitHash(): string
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive