Skip to content

Commit 1adbf74

Browse files
Jean85dbu
authored andcommitted
[2.0] Remove deprecations (#116)
Remove deprecated plugin option 'debug_plugins'
1 parent b7e032b commit 1adbf74

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## 2.0 (unreleased)
4+
5+
### Removed
6+
- Deprecated option `debug_plugins` has been removed from `PluginClient`
7+
38
## 1.8.2 (unreleased)
49

510
### Changed

src/PluginClient.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,12 @@ public function sendAsyncRequest(RequestInterface $request)
109109
*/
110110
private function configure(array $options = [])
111111
{
112-
if (isset($options['debug_plugins'])) {
113-
@trigger_error('The "debug_plugins" option is deprecated since 1.5 and will be removed in 2.0.', E_USER_DEPRECATED);
114-
}
115-
116112
$resolver = new OptionsResolver();
117113
$resolver->setDefaults([
118114
'max_restarts' => 10,
119-
'debug_plugins' => [],
120115
]);
121116

122-
$resolver
123-
->setAllowedTypes('debug_plugins', 'array')
124-
->setAllowedValues('debug_plugins', function (array $plugins) {
125-
foreach ($plugins as $plugin) {
126-
// Make sure each object passed with the `debug_plugins` is an instance of Plugin.
127-
if (!$plugin instanceof Plugin) {
128-
return false;
129-
}
130-
}
131-
132-
return true;
133-
});
117+
$resolver->setAllowedTypes('max_restarts', 'int');
134118

135119
return $resolver->resolve($options);
136120
}

0 commit comments

Comments
 (0)