Releases: Jean85/pretty-package-versions
Releases · Jean85/pretty-package-versions
2.1.0
2.0.6
2.0.5
2.0.4
2.0.3
1.6.0
Added
- Add forward compatibility layer for newer methods in 2.0 (see the 2.0 changelog)
2.0.2
2.0.1
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
andReplacedPackageException
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
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
toreference
), 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 argumentstring $version
has been split intostring $prettyVersion, string $reference