This repository was archived by the owner on Jan 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +80
-54
lines changed
Expand file tree Collapse file tree 8 files changed +80
-54
lines changed Original file line number Diff line number Diff line change 1+ name : Test application
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - ' master'
8+ - ' [0-9]+.x'
9+ - ' [0-9]+.[0-9]+'
10+ - ' [0-9]+.[0-9]+.x'
11+
12+ jobs :
13+ test :
14+ name : ' PHP ${{ matrix.php-version }}, Symfony ${{ matrix.symfony-version }}'
15+ runs-on : ubuntu-20.04
16+ env :
17+ COVERAGE : ${{ matrix.coverage }}
18+
19+ strategy :
20+ fail-fast : false
21+ matrix :
22+ include :
23+ - php-version : ' 7.1'
24+ dependencies : ' lowest'
25+ coverage : ' true'
26+ test-command : ' test-ci'
27+ - php-version : ' 7.1'
28+ test-command : ' test'
29+ - php-version : ' 7.2'
30+ test-command : ' test'
31+ - php-version : ' 7.3'
32+ test-command : ' test'
33+ - php-version : ' 7.4'
34+ test-command : ' test'
35+ - php-version : ' 8.0'
36+ test-command : ' test'
37+
38+ steps :
39+ - name : Checkout project
40+ uses : actions/checkout@v2
41+
42+ - name : Install and configure PHP
43+ uses : shivammathur/setup-php@v2
44+ with :
45+ php-version : ${{ matrix.php-version }}
46+ tools : ' composer:v2'
47+
48+ - name : Install dependencies with Composer
49+ uses : ramsey/composer-install@v1
50+ with :
51+ dependency-versions : ${{ matrix.dependencies }}
52+ composer-options : --prefer-dist --no-suggest
53+
54+ - name : Start HTTP Test Server
55+ run : vendor/bin/http_test_server > /dev/null 2>&1 &
56+
57+ - name : Execute test
58+ run : composer ${{ matrix.test-command }}
59+
60+ - name : Coverage
61+ if : ${{ matrix.coverage }}
62+ run : |
63+ wget https://scrutinizer-ci.com/ocular.phar
64+ php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file.
66The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
77and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
88
9+ ## [ 2.0.x] - 2020-02-xx
10+
11+ ### Added
12+
13+ - Add Support for PHP 8
914
1015## [ 2.0.1] - 2018-12-16
1116
Original file line number Diff line number Diff line change 1515 }
1616 ],
1717 "require" : {
18- "php" : " ^7.1" ,
18+ "php" : " ^7.1 || ^8.0 " ,
1919 "php-http/httplug" : " ^2.0" ,
2020 "psr/http-client" : " ^1.0" ,
2121 "guzzlehttp/guzzle" : " ^6.0"
2222 },
2323 "require-dev" : {
2424 "ext-curl" : " *" ,
25- "phpunit/phpunit" : " ^7.4" ,
26- "php-http/client-integration-tests" : " ^2.0"
25+ "phpunit/phpunit" : " ^7.4 || ^8.4 " ,
26+ "php-http/client-integration-tests" : " ^2.0 || ^3.0 "
2727 },
2828 "provide" : {
2929 "php-http/client-implementation" : " 1.0" ,
Original file line number Diff line number Diff line change 66
77use Http \Adapter \Guzzle6 \Client ;
88use Http \Client \Tests \HttpClientTest ;
9+ use Psr \Http \Client \ClientInterface ;
910
1011/**
1112 * @author David Buchmann <[email protected] > @@ -15,7 +16,7 @@ class DefaultHttpAdapterTest extends HttpClientTest
1516 /**
1617 * {@inheritdoc}
1718 */
18- protected function createHttpAdapter ()
19+ protected function createHttpAdapter (): ClientInterface
1920 {
2021 return new Client ();
2122 }
Original file line number Diff line number Diff line change 77use GuzzleHttp \Client as GuzzleClient ;
88use Http \Adapter \Guzzle6 \Client ;
99use Http \Client \Tests \HttpClientTest ;
10+ use Psr \Http \Client \ClientInterface ;
1011
1112/**
1213 * @author GeLo <[email protected] > @@ -16,7 +17,7 @@ abstract class HttpAdapterTest extends HttpClientTest
1617 /**
1718 * {@inheritdoc}
1819 */
19- protected function createHttpAdapter ()
20+ protected function createHttpAdapter (): ClientInterface
2021 {
2122 return new Client (new GuzzleClient (['handler ' => $ this ->createHandler ()]));
2223 }
Original file line number Diff line number Diff line change 66
77use GuzzleHttp \Client as GuzzleClient ;
88use Http \Adapter \Guzzle6 \Client ;
9+ use Http \Client \HttpAsyncClient ;
910use Http \Client \Tests \HttpAsyncClientTest ;
1011
1112/**
@@ -16,7 +17,7 @@ abstract class HttpAsyncAdapterTest extends HttpAsyncClientTest
1617 /**
1718 * {@inheritdoc}
1819 */
19- protected function createHttpAsyncClient ()
20+ protected function createHttpAsyncClient (): HttpAsyncClient
2021 {
2122 return new Client (new GuzzleClient (['handler ' => $ this ->createHandler ()]));
2223 }
Original file line number Diff line number Diff line change 1313 */
1414class PromiseTest extends TestCase
1515{
16- /**
17- * @expectedException \Exception
18- */
1916 public function testNonDomainExceptionIsHandled ()
2017 {
18+ $ this ->expectException (\Exception::class);
19+
2120 $ request = $ this ->prophesize ('Psr\Http\Message\RequestInterface ' );
2221 $ promise = new RejectedPromise (new \Exception ());
2322
You can’t perform that action at this time.
0 commit comments