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.
6
6
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
7
7
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
8
8
9
+ ## [ 2.0.x] - 2020-02-xx
10
+
11
+ ### Added
12
+
13
+ - Add Support for PHP 8
9
14
10
15
## [ 2.0.1] - 2018-12-16
11
16
Original file line number Diff line number Diff line change 15
15
}
16
16
],
17
17
"require" : {
18
- "php" : " ^7.1" ,
18
+ "php" : " ^7.1 || ^8.0 " ,
19
19
"php-http/httplug" : " ^2.0" ,
20
20
"psr/http-client" : " ^1.0" ,
21
21
"guzzlehttp/guzzle" : " ^6.0"
22
22
},
23
23
"require-dev" : {
24
24
"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 "
27
27
},
28
28
"provide" : {
29
29
"php-http/client-implementation" : " 1.0" ,
Original file line number Diff line number Diff line change 6
6
7
7
use Http \Adapter \Guzzle6 \Client ;
8
8
use Http \Client \Tests \HttpClientTest ;
9
+ use Psr \Http \Client \ClientInterface ;
9
10
10
11
/**
11
12
* @author David Buchmann <[email protected] >
@@ -15,7 +16,7 @@ class DefaultHttpAdapterTest extends HttpClientTest
15
16
/**
16
17
* {@inheritdoc}
17
18
*/
18
- protected function createHttpAdapter ()
19
+ protected function createHttpAdapter (): ClientInterface
19
20
{
20
21
return new Client ();
21
22
}
Original file line number Diff line number Diff line change 7
7
use GuzzleHttp \Client as GuzzleClient ;
8
8
use Http \Adapter \Guzzle6 \Client ;
9
9
use Http \Client \Tests \HttpClientTest ;
10
+ use Psr \Http \Client \ClientInterface ;
10
11
11
12
/**
12
13
* @author GeLo <[email protected] >
@@ -16,7 +17,7 @@ abstract class HttpAdapterTest extends HttpClientTest
16
17
/**
17
18
* {@inheritdoc}
18
19
*/
19
- protected function createHttpAdapter ()
20
+ protected function createHttpAdapter (): ClientInterface
20
21
{
21
22
return new Client (new GuzzleClient (['handler ' => $ this ->createHandler ()]));
22
23
}
Original file line number Diff line number Diff line change 6
6
7
7
use GuzzleHttp \Client as GuzzleClient ;
8
8
use Http \Adapter \Guzzle6 \Client ;
9
+ use Http \Client \HttpAsyncClient ;
9
10
use Http \Client \Tests \HttpAsyncClientTest ;
10
11
11
12
/**
@@ -16,7 +17,7 @@ abstract class HttpAsyncAdapterTest extends HttpAsyncClientTest
16
17
/**
17
18
* {@inheritdoc}
18
19
*/
19
- protected function createHttpAsyncClient ()
20
+ protected function createHttpAsyncClient (): HttpAsyncClient
20
21
{
21
22
return new Client (new GuzzleClient (['handler ' => $ this ->createHandler ()]));
22
23
}
Original file line number Diff line number Diff line change 13
13
*/
14
14
class PromiseTest extends TestCase
15
15
{
16
- /**
17
- * @expectedException \Exception
18
- */
19
16
public function testNonDomainExceptionIsHandled ()
20
17
{
18
+ $ this ->expectException (\Exception::class);
19
+
21
20
$ request = $ this ->prophesize ('Psr\Http\Message\RequestInterface ' );
22
21
$ promise = new RejectedPromise (new \Exception ());
23
22
You can’t perform that action at this time.
0 commit comments