PHP code example of mazanax / composer-project-version
1. Go to this page and download the library: Download mazanax/composer-project-version library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mazanax / composer-project-version example snippets
$packageVersion = \MZNX\ComposerPackageVersion\PackageVersion::init(__DIR__ . '/path/to/composer.json');
$version = $packageVersion->getVersion();
$packageVersion = \MZNX\ComposerPackageVersion\Version(__DIR__ . '/path/to/composer.json');