public static function getPackageVersion($composerName)
    {
        foreach (self::readComposerLock() as $composerLockData) {
            if (!isset($composerLockData['name'])) {
                continue;
            }
            if ($composerLockData['name'] === $composerName) {
                return preg_replace('/^v([0-9])/', '$1', $composerLockData['version'], 1);
            }
        }

        return '';
    }
public static function getPackageVersion($composerName)
    {
        foreach (self::readComposerLock() as $composerLockData) {
            if (!isset($composerLockData['name'])) {
                continue;
            }
            if ($composerLockData['name'] === $composerName) {
                return preg_replace('/^v([0-9])/', '$1', $composerLockData['version'], 1);
            }
        }

        return '';
    }
public static function getPackageVersion ( $ composerName ) { foreach ( self :: readComposerLock ( ) as $ composerLockData ) { if ( ! isset ( $ composerLockData [ 'name' ] ) ) { continue ; } if ( $ composerLockData [ 'name' ] === $ composerName ) { return preg_replace ( '/^v([0-9])/' , '$1' , $ composerLockData [ 'version' ] , 1 ) ; } } return '' ; }
Get the package version of the given package
Return normalized package version.

@param string $composerName
@return string
@see https://getcomposer.org/doc/04-schema.md#version
Get the package version of the given package Return normalized package version .