File tree Expand file tree Collapse file tree 12 files changed +26
-27
lines changed Expand file tree Collapse file tree 12 files changed +26
-27
lines changed Original file line number Diff line number Diff line change 4242 "symfony/options-resolver" : " ^3.4.34 || ^4.2.12 || ^5.0"
4343 },
4444 "conflict" : {
45- "php-http/guzzle6-adapter" : " <1.1" ,
4645 "php-http/curl-client" : " <2.0"
4746 },
4847 "require-dev" : {
4948 "matthiasnoback/symfony-dependency-injection-test" : " ^4.0" ,
5049 "nyholm/nsa" : " ^1.1" ,
5150 "nyholm/psr7" : " ^1.2.1" ,
5251 "php-http/cache-plugin" : " ^1.7" ,
53- "php-http/guzzle6 -adapter" : " ^1.1.1 || ^2.0 .1" ,
52+ "php-http/guzzle7 -adapter" : " ^0.1 .1" ,
5453 "php-http/mock-client" : " ^1.2" ,
5554 "php-http/promise" : " ^1.0" ,
5655 "polishsymfonycommunity/symfony-mocker-container" : " ^1.0" ,
Original file line number Diff line number Diff line change 44
55namespace Http \HttplugBundle \ClientFactory ;
66
7- use Http \Adapter \Guzzle6 \Client ;
7+ use Http \Adapter \Guzzle7 \Client ;
88
99/**
1010 * @author Tobias Nyholm <[email protected] > 1111 */
12- class Guzzle6Factory implements ClientFactory
12+ class Guzzle7Factory implements ClientFactory
1313{
1414 /**
1515 * {@inheritdoc}
1616 */
1717 public function createClient (array $ config = [])
1818 {
19- if (!class_exists ('Http\Adapter\Guzzle6 \Client ' )) {
20- throw new \LogicException ('To use the Guzzle6 adapter you need to install the "php-http/guzzle6 -adapter" package. ' );
19+ if (!class_exists ('Http\Adapter\Guzzle7 \Client ' )) {
20+ throw new \LogicException ('To use the Guzzle7 adapter you need to install the "php-http/guzzle7 -adapter" package. ' );
2121 }
2222
2323 return Client::createWithConfig ($ config );
Original file line number Diff line number Diff line change 6666 <argument type =" service" id =" httplug.collector.formatter" />
6767 <argument type =" service" id =" debug.stopwatch" />
6868 </service >
69- <service id =" httplug.collector.factory.guzzle6 " class =" Http\HttplugBundle\Collector\ProfileClientFactory" decorates =" httplug.factory.guzzle6 " public =" false" >
70- <argument type =" service" id =" httplug.collector.factory.guzzle6 .inner" />
69+ <service id =" httplug.collector.factory.guzzle7 " class =" Http\HttplugBundle\Collector\ProfileClientFactory" decorates =" httplug.factory.guzzle7 " public =" false" >
70+ <argument type =" service" id =" httplug.collector.factory.guzzle7 .inner" />
7171 <argument type =" service" id =" httplug.collector.collector" />
7272 <argument type =" service" id =" httplug.collector.formatter" />
7373 <argument type =" service" id =" debug.stopwatch" />
Original file line number Diff line number Diff line change 8989 <service id =" httplug.factory.guzzle5" class =" Http\HttplugBundle\ClientFactory\Guzzle5Factory" public =" false" >
9090 <argument type =" service" id =" httplug.message_factory" />
9191 </service >
92- <service id =" httplug.factory.guzzle6 " class =" Http\HttplugBundle\ClientFactory\Guzzle6Factory " public =" false" />
92+ <service id =" httplug.factory.guzzle7 " class =" Http\HttplugBundle\ClientFactory\Guzzle7Factory " public =" false" />
9393 <service id =" httplug.factory.react" class =" Http\HttplugBundle\ClientFactory\ReactFactory" public =" false" >
9494 <argument type =" service" id =" httplug.message_factory" />
9595 </service >
Original file line number Diff line number Diff line change 44
55namespace Http \HttplugBundle \Tests \Unit \DependencyInjection \Compiler ;
66
7- use Http \Adapter \Guzzle6 \Client ;
7+ use Http \Adapter \Guzzle7 \Client ;
88use Http \Client \HttpAsyncClient ;
99use Http \Client \HttpClient ;
1010use Http \Discovery \HttpClientDiscovery ;
Original file line number Diff line number Diff line change 1111 'stream_factory ' => 'my_stream_factory ' ,
1212 ],
1313 'classes ' => [
14- 'client ' => 'Http\Adapter\Guzzle6 \Client ' ,
14+ 'client ' => 'Http\Adapter\Guzzle7 \Client ' ,
1515 'message_factory ' => 'Http\Message\MessageFactory\GuzzleMessageFactory ' ,
1616 'uri_factory ' => 'Http\Message\UriFactory\GuzzleUriFactory ' ,
1717 'stream_factory ' => 'Http\Message\StreamFactory\GuzzleStreamFactory ' ,
18- 'psr18_client ' => 'Http\Adapter\Guzzle6 \Client ' ,
18+ 'psr18_client ' => 'Http\Adapter\Guzzle7 \Client ' ,
1919 'psr17_request_factory ' => 'Nyholm\Psr7\Factory\Psr17Factory ' ,
2020 'psr17_response_factory ' => 'Nyholm\Psr7\Factory\Psr17Factory ' ,
2121 'psr17_stream_factory ' => 'Nyholm\Psr7\Factory\Psr17Factory ' ,
2525 ],
2626 'clients ' => [
2727 'test ' => [
28- 'factory ' => 'httplug.factory.guzzle6 ' ,
28+ 'factory ' => 'httplug.factory.guzzle7 ' ,
2929 'http_methods_client ' => true ,
3030 'plugins ' => [
3131 'httplug.plugin.redirect ' ,
Original file line number Diff line number Diff line change 1010 <stream-factory >my_stream_factory</stream-factory >
1111 </main-alias >
1212 <classes >
13- <client >Http\Adapter\Guzzle6 \Client</client >
13+ <client >Http\Adapter\Guzzle7 \Client</client >
1414 <message-factory >Http\Message\MessageFactory\GuzzleMessageFactory</message-factory >
1515 <uri-factory >Http\Message\UriFactory\GuzzleUriFactory</uri-factory >
1616 <stream-factory >Http\Message\StreamFactory\GuzzleStreamFactory</stream-factory >
17- <psr18-client >Http\Adapter\Guzzle6 \Client</psr18-client >
17+ <psr18-client >Http\Adapter\Guzzle7 \Client</psr18-client >
1818 <psr17-request-factory >Nyholm\Psr7\Factory\Psr17Factory</psr17-request-factory >
1919 <psr17-response-factory >Nyholm\Psr7\Factory\Psr17Factory</psr17-response-factory >
2020 <psr17-stream-factory >Nyholm\Psr7\Factory\Psr17Factory</psr17-stream-factory >
2121 <psr17-uri-factory >Nyholm\Psr7\Factory\Psr17Factory</psr17-uri-factory >
2222 <psr17-uploaded-file-factory >Nyholm\Psr7\Factory\Psr17Factory</psr17-uploaded-file-factory >
2323 <psr17-server-request-factory >Nyholm\Psr7\Factory\Psr17Factory</psr17-server-request-factory >
2424 </classes >
25- <client name =" test" factory =" httplug.factory.guzzle6 " http-methods-client =" true" >
25+ <client name =" test" factory =" httplug.factory.guzzle7 " http-methods-client =" true" >
2626 <plugin >httplug.plugin.redirect</plugin >
2727 <plugin >
2828 <add-host host =" http://localhost" />
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ httplug:
66 uri_factory : my_uri_factory
77 stream_factory : my_stream_factory
88 classes :
9- client : Http\Adapter\Guzzle6 \Client
9+ client : Http\Adapter\Guzzle7 \Client
1010 message_factory : Http\Message\MessageFactory\GuzzleMessageFactory
1111 uri_factory : Http\Message\UriFactory\GuzzleUriFactory
1212 stream_factory : Http\Message\StreamFactory\GuzzleStreamFactory
13- psr18_client : Http\Adapter\Guzzle6 \Client
13+ psr18_client : Http\Adapter\Guzzle7 \Client
1414 psr17_request_factory : Nyholm\Psr7\Factory\Psr17Factory
1515 psr17_response_factory : Nyholm\Psr7\Factory\Psr17Factory
1616 psr17_stream_factory : Nyholm\Psr7\Factory\Psr17Factory
@@ -19,7 +19,7 @@ httplug:
1919 psr17_server_request_factory : Nyholm\Psr7\Factory\Psr17Factory
2020 clients :
2121 test :
22- factory : httplug.factory.guzzle6
22+ factory : httplug.factory.guzzle7
2323 http_methods_client : true
2424 plugins :
2525 - ' httplug.plugin.redirect'
Original file line number Diff line number Diff line change 77 async_client : auto
88 clients :
99 acme :
10- factory : httplug.factory.guzzle6
10+ factory : httplug.factory.guzzle7
1111 plugins :
1212 -
1313 decoder :
Original file line number Diff line number Diff line change 44
55namespace Http \HttplugBundle \Tests \Unit \ClientFactory ;
66
7- use Http \Adapter \Guzzle6 \Client ;
8- use Http \HttplugBundle \ClientFactory \Guzzle6Factory ;
7+ use Http \Adapter \Guzzle7 \Client ;
8+ use Http \HttplugBundle \ClientFactory \Guzzle7Factory ;
99use PHPUnit \Framework \TestCase ;
1010
1111/**
1212 * @author Tobias Nyholm <[email protected] > 1313 */
14- class Guzzle6FactoryTest extends TestCase
14+ class Guzzle7FactoryTest extends TestCase
1515{
1616 public function testCreateClient (): void
1717 {
1818 if (!class_exists (Client::class)) {
1919 $ this ->markTestSkipped ('Guzzle6 adapter is not installed ' );
2020 }
2121
22- $ factory = new Guzzle6Factory ();
22+ $ factory = new Guzzle7Factory ();
2323 $ client = $ factory ->createClient ();
2424
2525 $ this ->assertInstanceOf (Client::class, $ client );
You can’t perform that action at this time.
0 commit comments