protected function resolveExplicitList(PackageInterface $package, $patches)
    {
        $collectedPatches = new PatchCollection();
        if (!is_array($patches)) {
            $this->handleException(Exception\InvalidPackageConfigurationValue($package, 'extra.patches', $patches, 'The extra.patches configuration must be an array.'));
        } else {
            $packageDirectory = $this->installationManager->getInstallPath($package);
            foreach ($patches as $forPackageHandle => $patchList) {
                if (!is_array($patchList)) {
                    $this->handleException(Exception\InvalidPackageConfigurationValue($package, 'extra.patches', $package, "The \"{$forPackageHandle}\" value must be an array."));
                    continue;
                }
                foreach ($patchList as $patchDescription => $patchData) {
                    try {
                        list($path, $levels) = $this->extractPatchData($package, $patchData);
                        $localFile = $this->pathResolver->resolve($path, $packageDirectory);
                        if ($localFile === '') {
                            $this->handleException(Exception\InvalidPackageConfigurationValue($package, 'extra.patches', $package, "The path of the \"{$patchDescription}\" patch is empty or is not a string."));
                        }
                        $collectedPatches->addPatch(
                            new Patch($package, $forPackageHandle, $path, $localFile, $patchDescription, $levels)
                        );
                    } catch (BaseException $x) {
                        $this->handleException($x);
                    }
                }
            }
        }

        return $collectedPatches;
    }