Commit f022a06e by Qiang Xue

renamed composer installation type.

parent 380bb5cc
...@@ -31,7 +31,7 @@ class Installer extends LibraryInstaller ...@@ -31,7 +31,7 @@ class Installer extends LibraryInstaller
*/ */
public function supports($packageType) public function supports($packageType)
{ {
return $packageType === 'yii-extension'; return $packageType === 'yii2-extension';
} }
/** /**
...@@ -65,7 +65,7 @@ class Installer extends LibraryInstaller ...@@ -65,7 +65,7 @@ class Installer extends LibraryInstaller
protected function addPackage(PackageInterface $package) protected function addPackage(PackageInterface $package)
{ {
$extension = [ $extension = [
'name' => $package->getPrettyName(), 'name' => $package->getName(),
'version' => $package->getVersion(), 'version' => $package->getVersion(),
]; ];
...@@ -76,14 +76,14 @@ class Installer extends LibraryInstaller ...@@ -76,14 +76,14 @@ class Installer extends LibraryInstaller
} }
$extensions = $this->loadExtensions(); $extensions = $this->loadExtensions();
$extensions[$package->getUniqueName()] = $extension; $extensions[$package->getName()] = $extension;
$this->saveExtensions($extensions); $this->saveExtensions($extensions);
} }
protected function removePackage(PackageInterface $package) protected function removePackage(PackageInterface $package)
{ {
$packages = $this->loadExtensions(); $packages = $this->loadExtensions();
unset($packages[$package->getUniqueName()]); unset($packages[$package->getName()]);
$this->saveExtensions($packages); $this->saveExtensions($packages);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment