From feefd51565bb8ead38e355b9e501685b5254d0d5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 3 Dec 2015 16:17:58 +0000 Subject: [PATCH] Fix custom installer example, fixes #4648 --- doc/articles/custom-installers.md | 2 +- src/Composer/Repository/ComposerRepository.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/articles/custom-installers.md b/doc/articles/custom-installers.md index 5cf93a9e7..8b3536826 100644 --- a/doc/articles/custom-installers.md +++ b/doc/articles/custom-installers.md @@ -159,7 +159,7 @@ class TemplateInstaller extends LibraryInstaller /** * {@inheritDoc} */ - public function getPackageBasePath(PackageInterface $package) + public function getInstallPath(PackageInterface $package) { $prefix = substr($package->getPrettyName(), 0, 23); if ('phpdocumentor/template-' !== $prefix) { diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index acfe10b0d..5ee0a5f64 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -308,6 +308,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito if ($cacheKey && $this->cache->sha256($cacheKey) === $hash) { $packages = json_decode($this->cache->read($cacheKey), true); } else { + // TODO check if we can do if-modified-since or etag header here and skip the listings $packages = $this->fetchFile($url, $cacheKey, $hash); }