Convert package channel in order for it to be compatible with current version of Magento Connect Manager

@param string $channel

@return string
770227
public function convertChannelFromV1x($channel)
    {
        $channelMap = array(
            'connect.magentocommerce.com/community' => 'community',
            'connect.magentocommerce.com/core' => 'community'
        );
        if (!empty($channel) && isset($channelMap[$channel])) {
            $channel = $channelMap[$channel];
        }
        return $channel;
    }
236652
public function detachCallback($channel)
    {
        $callbackName = $this->getPrefixKeys().$channel;

        if (isset($this->callbacks[$callbackName])) {
            unset($this->callbacks[$callbackName]);
            $this->pubsub->unsubscribe($channel);
        }
    }
256193
public function setChannel(array $channel)
    {
        foreach ($channel as $element => $value) {
            $setter = 'set' . ucfirst($element);

            if (method_exists($this, $setter)) {
                $this->$setter($value);
                unset($channel[$element]);
            }
        }

        $this->channel = $channel;

        return $this;
    }
516486
public static function getLogger($channel)
    {
        $callback = self::$callback;
        if (null === $callback) {
            return new NullLogger();
        }

        $logger = $callback($channel);
        if ($logger instanceof LoggerInterface) {
            return $logger;
        }

        throw new RuntimeException('Callback did not return an instance of \Psr\Log\LoggerInterface!');
    }
111699
public function addChannel($channel)
    {
        if ($channel instanceof ChannelInterface) {
            $channel = $channel->getId();
        }

        $channel = (string) $channel;

        if (false === array_search($channel, $this->channels)) {
            $this->channels[] = $channel;
        }

        return $this;
    }
392435
public function normalizeChannelName($channel)
    {
        if ($this->isGuardedChannel($channel)) {
            return Str::startsWith($channel, 'private-')
                ? Str::replaceFirst('private-', '', $channel)
                : Str::replaceFirst('presence-', '', $channel);
        }

        return $channel;
    }
1081678
protected function getFromCache($channel)
    {
        if (!$this->cache) {
            throw new LogicException('You need set to cache provider');
        }
        if ($this->getCache()->has($channel)) {
            return $this->getCache()->get($channel);
        }

        return false;
    }
777729
public function channelStatus($channel = '')
    {
        $cmd = implode(' ', array('CHANNEL', 'STATUS'));
        if ($channel !== '') {
            $cmd .= ' "' . $channel . '"';
        }
        $result = $this->send($cmd);
        return intval($result->getResult());
    }
1025878
public function removeChannel($channel)
    {
        if ($channel instanceof ChannelInterface) {
            $channel = $channel->getId();
        }

        $channel = (string) $channel;

        if (false !== ($key = array_search($channel, $this->channels))) {
            unset($this->channels[$key]);
        }

        return $this;
    }
911158
public function getChannel(string $channelName): SocketChannelP
    {
        $persistent = $this->protocol->client->getParam(Client::PARAM_USE_PERSISTENT_CONNECTION);
        try {
            $streamSocket = new StreamSocket(
                $this->ssl === 'ssl://' ? StreamSocket::TRANSPORT_SSL : StreamSocket::TRANSPORT_TCP,
                $this->host.':'.$channelName,
                null,
                [],
                $persistent
            );
            $socket = $streamSocket->getSocket();
        } catch (\Throwable $e) {
            $logger = $this->protocol->getClient()->getLogger();
            $logger->critical(sprintf(
                '[soluble-japha] %s (%s)',
                $e->getMessage(),
                __METHOD__
            ));
            throw new ConnectionException($e->getMessage(), $e->getCode());
        }
        stream_set_timeout($socket, -1);

        return new SocketChannelP($socket, $this->host, $this->java_recv_size, $this->java_send_size);
    }
946750
function _get_open_channel()
    {
        $channel = NET_SSH2_CHANNEL_EXEC;
        do {
            if (isset($this->channel_status[$channel]) && $this->channel_status[$channel] == NET_SSH2_MSG_CHANNEL_OPEN) {
                return $channel;
            }
        } while ($channel++ < NET_SSH2_CHANNEL_SUBSYSTEM);

        return false;
    }
1290985
private function _StreamStreamCallFactory($channel)
    {
        if (is_a($channel, 'Grpc\Internal\InterceptorChannel')) {
            return function ($method,
                             $deserialize,
                             array $metadata = [],
                             array $options = []) use ($channel) {
                return $channel->getInterceptor()->interceptStreamStream(
                    $method,
                    $deserialize,
                    $metadata,
                    $options,
                    $this->_StreamStreamCallFactory($channel->getNext())
                );
            };
        }
        return $this->_GrpcStreamStream($channel);
    }
129262
public function getChannel($message)
    {
        if (is_int($message)) {
            return $this->channels[$message];
        }
        return $this->channels[$message->getChannel()];
    }
528682
public function subscribe(string $channel): Promise {
        return call(function () use ($channel) {
            yield $this->connection->send(["subscribe", $channel]);

            $emitter = new Emitter;
            $this->emitters[$channel][\spl_object_hash($emitter)] = $emitter;

            return new Subscription($emitter->iterate(), function () use ($emitter, $channel) {
                $this->unloadEmitter($emitter, $channel);
            });
        });
    }
447227
public function updateChannel(Channel $channel)
    {
        $op = $this->sendUpdateChannelOperation($channel);

        // waiting for create operation finishes
        $op = $this->awaitOperation($op);

        if ($op->getState() != OperationState::Succeeded) {
            return null;
        }

        // get and return the createChannel
        return $this->getChannel($channel->getId());
    }
1298683
public function createLogger($channel)
    {
        Cascade::loadConfigFromArray($this->config);
        $logger = Cascade::getLogger($channel);
        $logger->pushProcessor(new PsrLogMessageProcessor());
        return $logger;
    }
1139871
private function _GrpcStreamUnary($channel)
    {
        return function ($method,
                         $deserialize,
                         array $metadata = [],
                         array $options = []) use ($channel) {
            $call = $this->call_invoker->ClientStreamingCall(
                $channel,
                $method,
                $deserialize,
                $options
            );
            $jwt_aud_uri = $this->_get_jwt_aud_uri($method);
            if (is_callable($this->update_metadata)) {
                $metadata = call_user_func(
                    $this->update_metadata,
                    $metadata,
                    $jwt_aud_uri
                );
            }
            $metadata = $this->_validate_and_normalize_metadata(
                $metadata
            );
            $call->start($metadata);
            return $call;
        };
    }