public function __construct($baseUrl = LegacyUrlPlugin::BASE_URL, $config = null)
{
$legacyMode = $this->isLegacyUrl($baseUrl);
$config = Collection::fromConfig($config ?: [], $this->defaultConfig, $legacyMode ? $this->legacyRequirements : []);
if ($legacyMode) {
$this->addSubscriber(new LegacyUrlPlugin($config['username'], $config['token']));
unset($config['username'], $config['token']);
}
parent::__construct($baseUrl, $config);
$this->setDescription(ServiceDescription::factory(__DIR__ . '/Resources/slack.json'));
}