readComposerLock() public static method

Read the content of the composer.lock
public static readComposerLock ( ) : array
return array
 /**
  * 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
  */
 public static function getPackageVersion($composerName)
 {
     foreach (ComposerUtility::readComposerLock() as $composerLockData) {
         if (!isset($composerLockData['name'])) {
             continue;
         }
         if ($composerLockData['name'] === $composerName) {
             return preg_replace('/^v([0-9])/', '$1', $composerLockData['version'], 1);
         }
     }
     return '';
 }