public static function loadLockPackage(ArrayLoader $loader, array $lockData, $dev = false)
    {
        $key = $dev ? 'packages-dev' : 'packages';

        if (isset($lockData[$key])) {
            foreach ($lockData[$key] as $i => $package) {
                $package = $loader->load($package);
                $lockData[$key][$i] = $package instanceof AliasPackage ? $package->getAliasOf() : $package;
            }
        }

        return $lockData;
    }