Skip to content

Commit 103a10b

Browse files
committed
Add multiple conditions to factories, prepare extraction
1 parent d97c2f7 commit 103a10b

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

src/MessageFactoryDiscovery.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ final class MessageFactoryDiscovery extends ClassDiscovery
2222
protected static $classes = [
2323
'guzzle' => [
2424
'class' => 'Http\Discovery\MessageFactory\GuzzleMessageFactory',
25-
'condition' => 'GuzzleHttp\Psr7\Request',
25+
'condition' => [
26+
'Http\Discovery\MessageFactory\GuzzleMessageFactory',
27+
'GuzzleHttp\Psr7\Request',
28+
],
2629
],
2730
'diactoros' => [
2831
'class' => 'Http\Discovery\MessageFactory\DiactorosMessageFactory',
29-
'condition' => 'Zend\Diactoros\Request',
32+
'condition' => [
33+
'Http\Discovery\MessageFactory\DiactorosMessageFactory',
34+
'Zend\Diactoros\Request',
35+
],
3036
],
3137
];
3238

src/StreamFactoryDiscovery.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ final class StreamFactoryDiscovery extends ClassDiscovery
2222
protected static $classes = [
2323
'guzzle' => [
2424
'class' => 'Http\Discovery\StreamFactory\GuzzleStreamFactory',
25-
'condition' => 'GuzzleHttp\Psr7\Stream',
25+
'condition' => [
26+
'Http\Discovery\StreamFactory\GuzzleStreamFactory',
27+
'GuzzleHttp\Psr7\Stream',
28+
],
2629
],
2730
'diactoros' => [
2831
'class' => 'Http\Discovery\StreamFactory\DiactorosStreamFactory',
29-
'condition' => 'Zend\Diactoros\Stream',
32+
'condition' => [
33+
'Http\Discovery\StreamFactory\DiactorosStreamFactory',
34+
'Zend\Diactoros\Stream',
35+
],
3036
],
3137
];
3238

src/UriFactoryDiscovery.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@ final class UriFactoryDiscovery extends ClassDiscovery
2222
protected static $classes = [
2323
'guzzle' => [
2424
'class' => 'Http\Discovery\UriFactory\GuzzleUriFactory',
25-
'condition' => 'GuzzleHttp\Psr7\Uri',
25+
'condition' => [
26+
'Http\Discovery\UriFactory\GuzzleUriFactory',
27+
'GuzzleHttp\Psr7\Uri',
28+
],
2629
],
2730
'diactoros' => [
2831
'class' => 'Http\Discovery\UriFactory\DiactorosUriFactory',
29-
'condition' => 'Zend\Diactoros\Uri',
32+
'condition' => [
33+
'Http\Discovery\UriFactory\DiactorosUriFactory',
34+
'Zend\Diactoros\Uri',
35+
],
3036
],
3137
];
3238

0 commit comments

Comments
 (0)