diff --git a/src/NodeJsPlugin.php b/src/NodeJsPlugin.php index 7345536..67c4f2c 100644 --- a/src/NodeJsPlugin.php +++ b/src/NodeJsPlugin.php @@ -2,6 +2,7 @@ namespace Mouf\NodeJsInstaller; use Composer\Composer; +use Composer\Package\AliasPackage; use Composer\Package\CompletePackage; use Composer\Script\Event; use Composer\EventDispatcher\EventSubscriberInterface; @@ -200,7 +201,9 @@ private function getMergedVersionConstraint() $versions = array(); foreach ($packagesList as $package) { - /* @var $package PackageInterface */ + if ($package instanceof AliasPackage) { + $package = $package->getAliasOf(); + } if ($package instanceof CompletePackage) { $extra = $package->getExtra(); if (isset($extra['mouf']['nodejs']['version'])) {