Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Remove the custom http plugin part #3

Open
soullivaneuh opened this issue Nov 8, 2017 · 0 comments
Open

Remove the custom http plugin part #3

soullivaneuh opened this issue Nov 8, 2017 · 0 comments

Comments

@soullivaneuh
Copy link
Contributor

soullivaneuh commented Nov 8, 2017

This part:

graylog-sdk/src/Graylog.php

Lines 155 to 175 in 51aade2

/**
* @param Plugin $plugin
*/
private function addPlugin(Plugin $plugin)
{
$this->plugins[] = $plugin;
$this->httpClientModified = true;
}
/**
* @param string $pluginClass
*/
private function removePlugin(string $pluginClass)
{
foreach ($this->plugins as $p => $plugin) {
if ($plugin instanceof $pluginClass) {
unset($this->plugins[$p]);
$this->httpClientModified = true;
}
}
}

And the custom http plugin client property are completely useless.

The plugin addition must be set by the end user, providing an another PluginClient

Remove this part and implement something like this instead: https://github.com/nexylan/nexycrypt/blob/9df19e89a7d00503f510ded20736287f869b003c/src/NexyCrypt.php#L90-L105

Note: a 0.x release should be made before.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant