protected function getManifestFromZipFile()
    {
        $this->zip = new \ZipArchive();
        if (true !== $this->zip->open($this->zipFile)) {
            throw new InternalServerErrorException('Failed to open imported zip file.');
        }

        $password = $this->getPassword();
        if (!empty($password)) {
            $this->zip->setPassword($password);
        }

        $manifest = $this->zip->getFromName('package.json');
        if (false === $manifest) {
            throw new BadRequestException('Cannot read package manifest. A valid password is required if this is a secured package.');
        }
        $manifest = DataFormatter::jsonToArray($manifest);

        return $manifest;
    }