src/Installer/PluginInstaller.php
public static function getInstallName(
        \Composer\Package\PackageInterface $package,
        \Composer\Package\PackageInterface $rootPackage = null
    ) {
        $packagePrettyName = $package->getPrettyName();
        $packageName = $package->getName();
        $installName = null;

        $rootPackageExtra = $rootPackage ? $rootPackage->getExtra() : null;
        if (!empty($rootPackageExtra['installer-name'])) {
            $installName = $this->mapRootExtra($rootPackageExtra['installer-name'], $packagePrettyName);
        }

        if (!$installName) {
            $packageExtra = $package->getExtra();
            if (!empty($packageExtra['installer-name'])) {
                $installName = $packageExtra['installer-name'];
            }
        }

        return $installName ?: static::guessInstallName($packageName);
    }
public static function getInstallName(
        \Composer\Package\PackageInterface $package,
        \Composer\Package\PackageInterface $rootPackage = null
    ) {
        $packagePrettyName = $package->getPrettyName();
        $packageName = $package->getName();
        $installName = null;

        $rootPackageExtra = $rootPackage ? $rootPackage->getExtra() : null;
        if (!empty($rootPackageExtra['installer-name'])) {
            $installName = $this->mapRootExtra($rootPackageExtra['installer-name'], $packagePrettyName);
        }

        if (!$installName) {
            $packageExtra = $package->getExtra();
            if (!empty($packageExtra['installer-name'])) {
                $installName = $packageExtra['installer-name'];
            }
        }

        return $installName ?: static::guessInstallName($packageName);
    }
Returns the install name of a package

The install name of packages are either explicitly specified in either
the root package's or the plugin package's `composer.json` using the
"installer-name" extra, or implicitly derived from the plugin package's
name.

Install names are determined the same way as plugin class names. See
{@see static::getPluginClassNames()} for details.

@param  \Composer\Package\PackageInterface      $package
@param  \Composer\Package\PackageInterface|null $rootPackage
@return string