File tree 7 files changed +19
-15
lines changed
7 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
5
+ - Compatibility with php-http/httplug 1.0 beta
6
+ - Switch to php-http/discovery 0.4
7
+
5
8
6
9
## 0.4.0 - 2015-12-16
7
10
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ $ composer require php-http/curl-client
20
20
21
21
## Usage
22
22
23
- ### Using [ php-http/discovery ] ( https://packagist.org/packages/php-http/discovery ) :
23
+ ### Using [ php-http/utils ] ( https://packagist.org/packages/php-http/utils ) :
24
24
25
25
``` php
26
+ use Http\Client\Utils\MessageFactory\GuzzleMessageFactory;
27
+ use Http\Client\Utils\StreamFactory\GuzzleStreamFactory;
26
28
use Http\Curl\CurlHttpClient;
27
- use Http\Discovery\MessageFactory\GuzzleMessageFactory;
28
- use Http\Discovery\StreamFactory\GuzzleStreamFactory;
29
29
30
30
$messageFactory = new GuzzleMessageFactory();
31
31
$client = new CurlHttpClient($messageFactory, new GuzzleStreamFactory());
@@ -53,9 +53,9 @@ $response = $client->sendRequest($request);
53
53
You can use [ cURL options] ( http://php.net/curl_setopt ) to configure CurlHttpClient:
54
54
55
55
``` php
56
+ use Http\Client\Utils\MessageFactory\GuzzleMessageFactory;
57
+ use Http\Client\Utils\StreamFactory\GuzzleStreamFactory;
56
58
use Http\Curl\CurlHttpClient;
57
- use Http\Discovery\MessageFactory\GuzzleMessageFactory;
58
- use Http\Discovery\StreamFactory\GuzzleStreamFactory;
59
59
60
60
$options = [
61
61
CURLOPT_CONNECTTIMEOUT => 10, // The number of seconds to wait while trying to connect.
Original file line number Diff line number Diff line change 13
13
"require" : {
14
14
"php" : " >=5.5" ,
15
15
"ext-curl" : " *" ,
16
- "php-http/httplug" : " 1.0.0-alpha3" ,
16
+ "php-http/httplug" : " ^ 1.0.0-alpha3" ,
17
17
"php-http/message-factory" : " ^1.0"
18
18
},
19
19
"require-dev" : {
20
20
"guzzlehttp/psr7" : " ^1.0" ,
21
21
"php-http/adapter-integration-tests" : " dev-master#48e5c0ee7b19772ab00060498f91886268b945c4" ,
22
- "php-http/discovery" : " dev-master#fd0cbe2ed125cc4f8fcc0378aff9874ce206e858" ,
22
+ "php-http/discovery" : " ^0.4" ,
23
+ "php-http/utils" : " ^0.2" ,
23
24
"phpunit/phpunit" : " ^4.8@stable" ,
24
25
"zendframework/zend-diactoros" : " ^1.0"
25
26
},
Original file line number Diff line number Diff line change 2
2
namespace Http \Curl \Tests ;
3
3
4
4
use Http \Client \HttpClient ;
5
+ use Http \Client \Utils \MessageFactory \DiactorosMessageFactory ;
6
+ use Http \Client \Utils \StreamFactory \DiactorosStreamFactory ;
5
7
use Http \Curl \CurlHttpClient ;
6
- use Http \Discovery \MessageFactory \DiactorosMessageFactory ;
7
- use Http \Discovery \StreamFactory \DiactorosStreamFactory ;
8
8
use Zend \Diactoros \Request ;
9
9
use Zend \Diactoros \Response ;
10
10
Original file line number Diff line number Diff line change 2
2
namespace Http \Curl \Tests ;
3
3
4
4
use Http \Client \HttpClient ;
5
+ use Http \Client \Utils \MessageFactory \GuzzleMessageFactory ;
6
+ use Http \Client \Utils \StreamFactory \GuzzleStreamFactory ;
5
7
use Http \Curl \CurlHttpClient ;
6
- use Http \Discovery \MessageFactory \GuzzleMessageFactory ;
7
- use Http \Discovery \StreamFactory \GuzzleStreamFactory ;
8
8
9
9
/**
10
10
* Tests for Http\Curl\CurlHttpClient
Original file line number Diff line number Diff line change 2
2
namespace Http \Curl \Tests ;
3
3
4
4
use Http \Client \HttpClient ;
5
+ use Http \Client \Utils \MessageFactory \DiactorosMessageFactory ;
6
+ use Http \Client \Utils \StreamFactory \DiactorosStreamFactory ;
5
7
use Http \Curl \CurlHttpClient ;
6
- use Http \Discovery \MessageFactory \DiactorosMessageFactory ;
7
- use Http \Discovery \StreamFactory \DiactorosStreamFactory ;
8
8
use Zend \Diactoros \Request ;
9
9
use Zend \Diactoros \Response ;
10
10
Original file line number Diff line number Diff line change 2
2
namespace Http \Curl \Tests ;
3
3
4
4
use Http \Client \HttpClient ;
5
+ use Http \Client \Utils \MessageFactory \GuzzleMessageFactory ;
6
+ use Http \Client \Utils \StreamFactory \GuzzleStreamFactory ;
5
7
use Http \Curl \CurlHttpClient ;
6
- use Http \Discovery \MessageFactory \GuzzleMessageFactory ;
7
- use Http \Discovery \StreamFactory \GuzzleStreamFactory ;
8
8
9
9
/**
10
10
* Tests for Http\Curl\CurlHttpClient
You can’t perform that action at this time.
0 commit comments