From c9041e165dc3d178bd0aa0904f1e45eeefe7f3bf Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Mon, 19 Nov 2018 11:32:53 +0100 Subject: [PATCH 1/2] Remove deprecated plugin option 'debug_plugins' --- src/PluginClient.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/PluginClient.php b/src/PluginClient.php index 7413152..70419e3 100644 --- a/src/PluginClient.php +++ b/src/PluginClient.php @@ -109,28 +109,12 @@ public function sendAsyncRequest(RequestInterface $request) */ private function configure(array $options = []) { - if (isset($options['debug_plugins'])) { - @trigger_error('The "debug_plugins" option is deprecated since 1.5 and will be removed in 2.0.', E_USER_DEPRECATED); - } - $resolver = new OptionsResolver(); $resolver->setDefaults([ 'max_restarts' => 10, - 'debug_plugins' => [], ]); - $resolver - ->setAllowedTypes('debug_plugins', 'array') - ->setAllowedValues('debug_plugins', function (array $plugins) { - foreach ($plugins as $plugin) { - // Make sure each object passed with the `debug_plugins` is an instance of Plugin. - if (!$plugin instanceof Plugin) { - return false; - } - } - - return true; - }); + $resolver->setAllowedTypes('max_restarts', 'int'); return $resolver->resolve($options); } From ad052f01b84aaea18b0bc33c64f25efed1af3cbb Mon Sep 17 00:00:00 2001 From: Alessandro Lai Date: Mon, 19 Nov 2018 11:36:09 +0100 Subject: [PATCH 2/2] Update changelog [skip CI] --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a32a18d..6c268e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## 2.0 (unreleased) + +### Removed +- Deprecated option `debug_plugins` has been removed from `PluginClient` + ## 1.8.2 (unreleased) ### Changed