https://github.com/ipunkt/composer-about
Parses composer.lock and returns informations about the used packages
https://github.com/ipunkt/composer-about
Last synced: about 1 year ago
JSON representation
Parses composer.lock and returns informations about the used packages
- Host: GitHub
- URL: https://github.com/ipunkt/composer-about
- Owner: ipunkt
- License: mit
- Created: 2014-06-15T09:44:50.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-23T05:54:33.000Z (almost 12 years ago)
- Last Synced: 2025-05-08T23:06:56.836Z (about 1 year ago)
- Language: PHP
- Size: 164 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Retrieve Information from composer.lock
=======================================
[](https://packagist.org/packages/ipunkt/composer-about) [](https://packagist.org/packages/ipunkt/composer-about) [](https://packagist.org/packages/ipunkt/composer-about) [](https://packagist.org/packages/ipunkt/composer-about)
Parses composer.lock and returns informations about the used packages
Usage
-----
Mainly developed for Laravel, but can still be used in all other Frameworks or Vanilla PHP applications.
1. Add service provider to app.config
`'Ipunkt\ComposerAbout\ComposerAboutServiceProvider',`
2. Use it in your routes.php or Controller action
`/** @var \Ipunkt\ComposerAbout\Structure\ComposerStructure $composerAbout */`
`$composerAbout = App::make('composer-about');`
API
---
### ComposerStructure::$hash
Hash of the current installed packages.
### ComposerStructure::$packages
A Collection of Package object instances for the packages used.
### ComposerStructure::$devpackages
A Collection of Package object instances for the dev packages used.
### ComposerStructure::licenses()
An array of all unique licenses for all required packages. Perhaps for a summary of used licenses. Can be very useful,
if you want to check, that there is a defined license that you do not want to have.
### Package
For current methods please see `Ipunkt\ComposerAbout\Structure\Data\Package.php`
### Package::getName()
Returns the name of the package.
### Package::getVersion()
Returns the version of the package.
### Package::getDescription()
Returns the description of the package.
### Package::getAuthors()
Returns an array of alle Authors...each author has 'name' and 'email' set, if possible.
### Package::getLicenses()
Returns the licenses of the package.
### Package::getType()
Returns the type of the package. E.g. library
### Package::getName()
Returns the name of the package.