Rollback plugin api version to 1.0.0 for now, add warning about requiring 1.0.0 exactly
parent
5ec6988218
commit
ddd140fd1c
|
@ -27,7 +27,7 @@ interface PluginInterface
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const PLUGIN_API_VERSION = '1.1.0';
|
||||
const PLUGIN_API_VERSION = '1.0.0';
|
||||
|
||||
/**
|
||||
* Apply plugin modifications to Composer
|
||||
|
|
|
@ -123,7 +123,9 @@ class PluginManager
|
|||
$currentPluginApiVersion = $this->getPluginApiVersion();
|
||||
$currentPluginApiConstraint = new Constraint('==', $this->versionParser->normalize($currentPluginApiVersion));
|
||||
|
||||
if (!$requiresComposer->matches($currentPluginApiConstraint)) {
|
||||
if ($requiresComposer->getPrettyString() === '1.0.0' && $this->getPluginApiVersion() === '1.0.0') {
|
||||
$this->io->writeError('<warning>The "' . $package->getName() . '" plugin requires composer-plugin-api 1.0.0, this *WILL* break in the future and it should be fixed ASAP (require ^1.0 for example).</warning>');
|
||||
} elseif (!$requiresComposer->matches($currentPluginApiConstraint)) {
|
||||
$this->io->writeError('<warning>The "' . $package->getName() . '" plugin was skipped because it requires a Plugin API version ("' . $requiresComposer->getPrettyString() . '") that does not match your Composer installation ("' . $currentPluginApiVersion . '"). You may need to run composer update with the "--no-plugins" option.</warning>');
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue