1
0
Fork 0

Fix custom installer example, fixes #4648

pull/4671/head
Jordi Boggiano 2015-12-03 16:17:58 +00:00
parent ee8871b2e2
commit feefd51565
2 changed files with 2 additions and 1 deletions

View File

@ -159,7 +159,7 @@ class TemplateInstaller extends LibraryInstaller
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function getPackageBasePath(PackageInterface $package) public function getInstallPath(PackageInterface $package)
{ {
$prefix = substr($package->getPrettyName(), 0, 23); $prefix = substr($package->getPrettyName(), 0, 23);
if ('phpdocumentor/template-' !== $prefix) { if ('phpdocumentor/template-' !== $prefix) {

View File

@ -308,6 +308,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
if ($cacheKey && $this->cache->sha256($cacheKey) === $hash) { if ($cacheKey && $this->cache->sha256($cacheKey) === $hash) {
$packages = json_decode($this->cache->read($cacheKey), true); $packages = json_decode($this->cache->read($cacheKey), true);
} else { } else {
// TODO check if we can do if-modified-since or etag header here and skip the listings
$packages = $this->fetchFile($url, $cacheKey, $hash); $packages = $this->fetchFile($url, $cacheKey, $hash);
} }