Skip to content

Commit 977b0cf

Browse files
committed
Allow middleware instances
1 parent c0e9696 commit 977b0cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Client.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ protected function constructMiddlewares(array $options): MiddlewareRunner
143143
$args = [];
144144
$args[] = $options;
145145
foreach ($set as $middleware) {
146+
if (is_object($middleware)) {
147+
$args[] = $middleware;
148+
149+
continue;
150+
}
151+
146152
$args[] = $this->locator->get($middleware);
147153
}
148154

0 commit comments

Comments
 (0)