Skip to content

Commit

Permalink
兼容composer2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwuxin committed Oct 27, 2020
1 parent f5400a1 commit 52f4b71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "topthink/think-installer",
"type": "composer-plugin",
"require": {
"composer-plugin-api": "^1.0"
"composer-plugin-api": "^1.0||^2.0"
},
"require-dev": {
"composer/composer": "1.0.*@dev"
"composer/composer": "^1.0||^2.0"
},
"license": "Apache-2.0",
"authors": [
Expand Down
12 changes: 10 additions & 2 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace think\composer;

use Composer\Composer;
use Composer\Installer;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;

Expand All @@ -21,6 +20,15 @@ public function activate(Composer $composer, IOInterface $io)

//扩展
$manager->addInstaller(new ThinkExtend($io, $composer));
}

public function deactivate(Composer $composer, IOInterface $io)
{

}

public function uninstall(Composer $composer, IOInterface $io)
{

}
}
}

0 comments on commit 52f4b71

Please sign in to comment.