jean85/pretty-package-versions
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
The Jean85/Pretty-Package-Versions is a smart, independent wrapper designed for retrieving eloquent version strings of your dependencies. It's a highly valuable tool for developers, streamlining the way they track and view different versions of their installed dependencies. Furthermore, this package provides a smooth upgrade path, enabling users to obtain pretty versions without restricting them to any specific Composer version.
To use Jean85/Pretty-Package-Versions, you must first install it using Composer. You can do this from the CLI using the command composer require 'jean85/pretty-package-versions:^1.5 || ^2.0'
. Alternatively, you can add this directly to your composer.json
file:
{
"require": {
"jean85/pretty-package-versions": "^1.5 || ^2.0"
}
}
Once installed, you can utilize the package through the Jean85\PrettyVersions
class. This class provides a single method returning a Jean85\Version
object for the requested package.
Here is a simple usage example:
use Jean85\PrettyVersions;
$version = PrettyVersions::getVersion('phpunit/phpunit');
echo $version->getPrettyVersion(); // Example Output: '6.0.0'
This package also provides several other useful methods to get specific version information, like getShortVersion()
, getReference()
, getShortReference()
, getVersionWithShortReference()
, and others.
The comprehensive documentation and related details for the jean85/pretty-package-versions can be found directly on its GitHub page. This includes installation instructions, a compatibility chart, complete usage instructions including code examples, and more. Visit the Jean85/Pretty-Package-Versions GitHub page to access all of these resources and further understand how to optimally leverage this highly useful package.