Skip to content

mazanax/composer-package-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimum PHP Version Latest Stable Version Build Status codecov

Composer Package Version

Helper function to get a current version from composer.json file in your project

If you want to get separate values of major/minor/patch version, you can try mazanax/composer-version-semver

Installation

composer require mazanax/composer-project-version

Usage

• PackageVersion class

<?php

$packageVersion = \MZNX\ComposerPackageVersion\PackageVersion::init(__DIR__ . '/path/to/composer.json');
$version = $packageVersion->getVersion();

• Version function

$packageVersion = \MZNX\ComposerPackageVersion\Version(__DIR__ . '/path/to/composer.json');

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages