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.
You can install the package via composer:
composer require ahinkle/packagist-latest-version
$client = new \GuzzleHttp\Client();
$packagist = new PackagistLatestVersion($client);
$packagist->getLatestRelease('laravel/framework');
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email ahinkle10@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.