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;
    }