Neos\Flow\Package\PackageManager::getPackageKeyFromManifest PHP Method

getPackageKeyFromManifest() protected method

If it is a Flow package the name of the containing directory will be used. Else if the composer name of the package matches the first part of the lowercased namespace of the package, the mixed case version of the composer name / namespace will be used, with backslashes replaced by dots. Else the composer name will be used with the slash replaced by a dot
protected getPackageKeyFromManifest ( array $manifest, string $packagePath ) : string
$manifest array
$packagePath string
return string
    protected function getPackageKeyFromManifest(array $manifest, $packagePath)
    {
        if (isset($manifest['extra']['neos']['package-key']) && $this->isPackageKeyValid($manifest['extra']['neos']['package-key'])) {
            return $manifest['extra']['neos']['package-key'];
        }
        $composerName = $manifest['name'];
        $autoloadNamespace = null;
        $type = null;
        if (isset($manifest['autoload']['psr-0']) && is_array($manifest['autoload']['psr-0'])) {
            $namespaces = array_keys($manifest['autoload']['psr-0']);
            $autoloadNamespace = reset($namespaces);
        }
        if (isset($manifest['type'])) {
            $type = $manifest['type'];
        }
        return $this->derivePackageKey($composerName, $type, $packagePath, $autoloadNamespace);
    }