omatech / vendor-version
Check composer installation and get information of packages installed in vendor folder
dev-master
2019-11-17 10:52 UTC
Requires (Dev)
- phpunit/phpunit: 8.4.3
This package is auto-updated.
Last update: 2024-10-17 22:32:58 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