浏览代码

Fix custom installer example, fixes #4648

Jordi Boggiano 9 年之前
父节点
当前提交
feefd51565
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      doc/articles/custom-installers.md
  2. 1 0
      src/Composer/Repository/ComposerRepository.php

+ 1 - 1
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) {

+ 1 - 0
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);
         }