ahinkle / packagist-latest-version
Obtains the latest version release of Composer Packages from the Packagist API
Installs: 1 640
Dependents: 2
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^8.0
- spatie/packagist-api: ^2.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-10-10 01:14:30 UTC
README
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.