Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahinkle/packagist-latest-version
This PHP package provides an easy way to retrieve the latest stable release from composer packages via the Packagist API.
https://github.com/ahinkle/packagist-latest-version
composer packagist packagist-api php
Last synced: 17 days ago
JSON representation
This PHP package provides an easy way to retrieve the latest stable release from composer packages via the Packagist API.
- Host: GitHub
- URL: https://github.com/ahinkle/packagist-latest-version
- Owner: ahinkle
- License: mit
- Created: 2020-03-18T14:50:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T21:07:40.000Z (about 2 years ago)
- Last Synced: 2024-08-08T16:32:53.518Z (5 months ago)
- Topics: composer, packagist, packagist-api, php
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Composer Packagist Latest Version
This package provides an easy way to retrieve the latest stable release from composer packages via [the Packagist API](https://packagist.org/apidoc). This package was inspired by [this tweet](https://twitter.com/seldaek/status/1240285841492148225) 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:
```bash
composer require ahinkle/packagist-latest-version
```## Usage
``` php
$client = new \GuzzleHttp\Client();$packagist = new PackagistLatestVersion($client);
$packagist->getLatestRelease('laravel/framework');
```### Testing
``` bash
composer test
```### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Andy Hinkle](https://github.com/ahinkle)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.