From 0f9988b0650027827ce87ed0020a43f6740071a0 Mon Sep 17 00:00:00 2001 From: Fabian Vogler Date: Fri, 6 Sep 2013 16:49:01 +0200 Subject: [PATCH 1/2] Documentation fixes for composer-plugin type --- doc/articles/custom-installers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/articles/custom-installers.md b/doc/articles/custom-installers.md index 7c7117248..daaa2c0e8 100644 --- a/doc/articles/custom-installers.md +++ b/doc/articles/custom-installers.md @@ -72,7 +72,7 @@ Example: { "name": "phpdocumentor/template-installer-plugin", - "type": "composer-installer-plugin", + "type": "composer-plugin", "license": "MIT", "autoload": { "psr-0": {"phpDocumentor\\Composer": "src/"} @@ -97,7 +97,7 @@ Example: use Composer\Composer; use Composer\IO\IOInterface; - use Composer\Plugin\PluginInterface + use Composer\Plugin\PluginInterface; class TemplateInstallerPlugin implements PluginInterface { From 7b43d4909cc1fa8029d21651045857a9df8a2e6a Mon Sep 17 00:00:00 2001 From: Fabian Vogler Date: Fri, 6 Sep 2013 17:44:16 +0200 Subject: [PATCH 2/2] Use getPackageBasePath instead of getInstallPath As LibraryInstaller uses getPackageBasePath for uninstall: https://github.com/composer/composer/blob/master/src/Composer/Installer/LibraryInstaller.php#L126 --- doc/articles/custom-installers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/articles/custom-installers.md b/doc/articles/custom-installers.md index daaa2c0e8..a130e4c7c 100644 --- a/doc/articles/custom-installers.md +++ b/doc/articles/custom-installers.md @@ -145,7 +145,7 @@ Example: /** * {@inheritDoc} */ - public function getInstallPath(PackageInterface $package) + public function getPackageBasePath(PackageInterface $package) { $prefix = substr($package->getPrettyName(), 0, 23); if ('phpdocumentor/template-' !== $prefix) {