ahinkle/packagist-latest-version

Obtains the latest version release of Composer Packages from the Packagist API

2.1.0 2022-12-09 21:06 UTC

This package is auto-updated.

Last update: 2024-04-10 00:14:40 UTC


README

68747470733a2f2f7061636b61676973742e6f72672f62756e646c65732f7061636b61676973747765622f696d672f6c6f676f2d736d616c6c2e706e673f763d31353834303238333233

Build Status Latest Stable Version Style CI Total Downloads License

Composer Packagist Latest Version

This package provides an easy way to retrieve the latest stable release from composer packages via the Packagist API. This package was inspired by this tweet after discovering that it's not possible to retrieve the latest non-development tagged release.

This package will return the highest tagged non-developmental release. e.g. When there is a 2.1.0 release then a new 1.2.1 release is posted, this will continue to show that 2.1.0 is still the latest version.

Installation

You can install the package via composer:

composer require ahinkle/packagist-latest-version

Usage

$client = new \GuzzleHttp\Client();

$packagist = new PackagistLatestVersion($client);

$packagist->getLatestRelease('laravel/framework');

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email ahinkle10@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.