Skip to content

Commit 8f76c4d

Browse files
committed
Allow composer v2 API
Change the constraint to allow composer v2 API and add missing PluginInterface methods. It's not possible to run tests with this version, however, it will probably work correctly because the plugin does not rely on any API that has been deprecated, modified or changed its behaviour in composer v2.
1 parent c00eb3e commit 8f76c4d

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"require": {
1313
"ext-json": "*",
1414
"php": ">=5.6.0",
15-
"composer-plugin-api": "^1.1"
15+
"composer-plugin-api": "~1.1 | ^2"
1616
},
1717
"require-dev": {
1818
"composer/composer": "~1.0",

src/Plugin.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ public function activate(Composer $composer, IOInterface $io)
3535
$this->logger = new IOLogger($io);
3636
}
3737

38+
/**
39+
* {@inheritdoc}
40+
*/
41+
public function deactivate(Composer $composer, IOInterface $io)
42+
{
43+
}
44+
45+
/**
46+
* {@inheritdoc}
47+
*/
48+
public function uninstall(Composer $composer, IOInterface $io)
49+
{
50+
}
51+
52+
3853
/**
3954
* {@inheritdoc}
4055
*/
@@ -70,4 +85,4 @@ public function applyPatches(Composer $composer)
7085

7186
$patcher->patch();
7287
}
73-
}
88+
}

0 commit comments

Comments
 (0)