Skip to content

Commit 2cf2a33

Browse files
committed
Support Composer 2.0
Minimal changes to updated the plugin to support Composer 2.0 which is expected late May/beginning of June. Changes are based on guidance found in: * #108 * composer/composer#8726 * https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-integrators-and-plugin-authors Tested by danepowell and myself (Windows 7). Further testing would be very welcome! Fixes 108
1 parent 7c75210 commit 2cf2a33

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"require": {
2626
"php": ">=5.3",
27-
"composer-plugin-api": "^1.0",
27+
"composer-plugin-api": "^1.0 || ^2.0",
2828
"squizlabs/php_codesniffer": "^2 || ^3 || 4.0.x-dev"
2929
},
3030
"require-dev": {

src/Plugin.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,20 @@ public function activate(Composer $composer, IOInterface $io)
124124
$this->init();
125125
}
126126

127+
/**
128+
* {@inheritDoc}
129+
*/
130+
public function deactivate(Composer $composer, IOInterface $io)
131+
{
132+
}
133+
134+
/**
135+
* {@inheritDoc}
136+
*/
137+
public function uninstall(Composer $composer, IOInterface $io)
138+
{
139+
}
140+
127141
/**
128142
* Prepares the plugin so it's main functionality can be run.
129143
*

0 commit comments

Comments
 (0)