Skip to content

Commit

Permalink
Updates to support version 2+ of the composer plugin API
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed Apr 24, 2020
1 parent 06b1cd0 commit c3e325f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"composer-plugin-api": "^1.1"
"composer-plugin-api": "^1.1 || ^2.0"
},
"autoload": {
"psr-4": {
Expand Down
22 changes: 21 additions & 1 deletion src/GithubArchiveInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class GithubArchiveInstaller implements PluginInterface, EventSubscriberInterfac
* Apply plugin modifications to Composer.
*
* @param \Composer\Composer $composer Composer instance
* @param \Composer\IO\IOInterface $io Input/Output interface
* @param \Composer\IO\IOInterface $io Input/Output interface
*/
public function activate( Composer $composer, IOInterface $io ) {
$this->composer = $composer;
Expand Down Expand Up @@ -114,4 +114,24 @@ public function getPackageFromOperation( OperationInterface $operation ) {
return $operation->getPackage();
}

/**
* Deactivate
*
* @param \Composer\Composer $composer Composer instance
* @param \Composer\IO\IOInterface $io Input/Output interface
*/
public function deactivate( Composer $composer, IOInterface $io ) {
// Nothing to do here.
}

/**
* Uninstall
*
* @param \Composer\Composer $composer Composer instance
* @param \Composer\IO\IOInterface $io Input/Output interface
*/
public function uninstall( Composer $composer, IOInterface $io ) {
// Nothing to do here.
}

}

0 comments on commit c3e325f

Please sign in to comment.