protected static function readComposerManifest(string $manifestPath): array
    {
        $manifestPathAndFilename = $manifestPath . 'composer.json';
        if (isset(self::$composerManifestCache[$manifestPathAndFilename])) {
            return self::$composerManifestCache[$manifestPathAndFilename];
        }

        if (!is_file($manifestPathAndFilename)) {
            throw new Exception\MissingPackageManifestException(sprintf('No composer manifest file found at "%s".', $manifestPathAndFilename), 1349868540);
        }
        $json = file_get_contents($manifestPathAndFilename);
        $composerManifest = json_decode($json, true);

        if ($composerManifest === null) {
            throw new Exception\InvalidPackageManifestException(sprintf('The composer manifest file found at "%s" could not be parsed. Check for JSON syntax errors!', $manifestPathAndFilename), 1493909988);
        }

        self::$composerManifestCache[$manifestPathAndFilename] = $composerManifest;
        return $composerManifest;
    }