omatech/vendor-version

Check composer installation and get information of packages installed in vendor folder

Maintainers

Package info

github.com/omatech/vendor-version

pkg:composer/omatech/vendor-version

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

dev-master 2019-11-17 10:52 UTC

This package is auto-updated.

Last update: 2026-02-28 00:16:02 UTC


README

$vv = new VendorVersion();
$vv->init(YOUR_PROJECT_ROOT_FOLDER);
$res=$vv->isInstalled('phpunit/phpunit');
// returns true or false

if ($res)
{
    $version_res=$vv->checkMinVersion('phpunit/phpunit', '8.0');
    // returns true if at least you have version 8.0 installed
    $version=$vv->getVersion('phpunit/phpunit');
    // now $version have the exact phpunit/phpunit installed
}

Test

phpunit --bootstrap vendor/autoload.php tests