strausmann / composer-installed
Some Interactions with the installed.json file from Composer
1.0.4
2020-08-18 22:45 UTC
Requires
- php: ^7.0
Requires (Dev)
- filp/whoops: ^2.3
- friendsofphp/php-cs-fixer: ^2.10
- phpunit/php-code-coverage: ^6.1
- phpunit/phpunit: ^7.0
- squizlabs/php_codesniffer: ~2.1
- vlucas/phpdotenv: ^4.1
This package is auto-updated.
Last update: 2025-03-29 01:24:13 UTC
README
Composer Installed JSON Wrapper
Requirements
- PHP >= 7.0
Install
Via Composer:
$ composer require strausmann/composer-installed
Basic usage of strausmann/composer-installed
wrapper
<?php
use Strausmann\ComposerInstalled\Packages;
// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';
// Initalization the Packages Class
$path = Path_to_RootDir_with_Vendor_Folder;
$packages = new Packages($path);
$packages->findPackage('composer/composer');
// returns the original version (e.g. v1.2.3) if vendor/package is installed,
// or null if it is provided/replaced,
echo $packages->getPrettyVersion();