Access the current details of your composer.lock file.
1.) Now install the composer-info
package by running the following command:
composer require webklex/composer-info
Detailed config/composer-info.php configuration:
location
— used default composer.lock location
This is a basic example, which will echo the current version of webklex/composer-info
and dump the
all available package information.
use Webklex\ComposerInfo\ComposerInfo;
new ComposerInfo();
var_dump(ComposerInfo::getPackage("webklex/composer-info"));
echo ComposerInfo::getPackageVersion("webklex/composer-info");
If you encounter any problems or if you find a bug, please don't hesitate to create a new issue. However please be aware that it might take some time to get an answer. Off topic, rude or abusive issues will be deleted without any notice.
If you need immediate or commercial support, feel free to send me a mail at github@webklex.com.
If you write source code in your issue, please consider to format it correctly. This makes it so much nicer to read and people are more likely to comment and help :)
``` php
echo 'your php code...';
```
will turn into:
echo 'your php code...';
Everyone can contribute to this project. Every pull request will be considered but it can also happen to be declined. To prevent unnecessary work, please consider to create a feature issue first, if you're planning to do bigger changes. Of course you can also create a new feature issue if you're just wishing a feature ;)
Method | Arguments | Return | Description |
---|---|---|---|
setConfig | array | string $config | self |
getPackage | string $name | array | Get all available information for a given package name |
getPackageVersion | string $name | string | Get the version for a given package name |
load | string $location | string | Load a specific composer.lock file |
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email github@webklex.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.