Download the PHP package jean85/pretty-package-versions without Composer

On this page you can find all versions of the php package jean85/pretty-package-versions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

All versions of pretty-package-versions with dependencies

Informations about the package pretty-package-versions

SWUbanner

jean85/pretty-package-versions

PHP Version Stable release

Build status Codecov

A small, independent wrapper to get pretty versions strings of your dependencies.

Installation

To install, use Composer:

Compatibility

This package was born as a thin wrapper for ocramius/package-versions; with the advent of Composer 2, this is no longer needed, since we can use directly Composer\InstalledVersions. This led to this version compatibility chart:

pretty-package-versions Composer Dependency used
Up to 1.2 1.x only ocramius/package-versions
1.3 Both 1.x and 2.x composer/package-versions-deprecated, fork of ocramius/package-versions
1.4 2.x only None
1.5+ Both 1.x and 2.x composer/package-versions-deprecated, fork of ocramius/package-versions
2.0 2.x only None

This means that, with this package, you can obtain pretty versions without tying your user to any specific Composer version, with a smooth upgrade path. The release of 1.4 was reverted due to some discussion in #21 and related issues.

Usage

This package should be used with a single class, Jean85\PrettyVersions: it provides a single method that returns a Jean85\Version object for the requested package, like in this example:

The Version class has also a __toString() method implemented, so it can be easily cast to a string; the result would be the same as calling the getPrettyVersion() method.

Available methods

The Jean85\Version class has these public methods available:

Since 1.5

Since the 1.5 release, there are two additional methods available:

Before 2.0

The methods with reference in the name were introduced in the 2.0 release, to better reflect the meaning of the data retrieved from Composer 2 API. The behavior is the same as the old methods, which are still present but deprecated:

New method Old, deprecated method
Version::getReference() Version::getCommitHash()
Version::getShortReference() Version::getShortCommitHash()
Version::getVersionWithShortReference() Version::getVersionWithShortCommit()

Version
Requires php Version ^7.1|^8.0
composer-runtime-api Version ^2.0.0

The package jean85/pretty-package-versions contains the following files

Loading the files please wait ....