private function getLockFileHash(string $path) : string
    {
        $lockFile = json_decode($this->loadFile($path . DIRECTORY_SEPARATOR . 'composer.lock'));
        $hashKey  = 'content-hash';

        if (!isset($lockFile->$hashKey)) {
            throw new \Exception('could not find content hash, please update composer to the latest version');
        }

        return $lockFile->$hashKey;
    }
private function getLockFileHash(string $path) : string
    {
        $lockFile = json_decode($this->loadFile($path . DIRECTORY_SEPARATOR . 'composer.lock'));
        $hashKey  = 'content-hash';

        if (!isset($lockFile->$hashKey)) {
            throw new \Exception('could not find content hash, please update composer to the latest version');
        }

        return $lockFile->$hashKey;
    }
private function getLockFileHash ( string $ path ) : string { $ lockFile = json_decode ( $ this -> loadFile ( $ path . DIRECTORY_SEPARATOR . 'composer.lock' ) ) ; $ hashKey = 'content-hash' ; if ( ! isset ( $ lockFile -> $ hashKey ) ) { throw new \ Exception ( 'could not find content hash, please update composer to the latest version' ) ; } return $ lockFile -> $ hashKey ; }
Read the composer.lock file and extract the composer.json hash

@param  string $path
@return string
@throws \Exception
Read the composer . lock file and extract the composer . json hash