File tree Expand file tree Collapse file tree 8 files changed +32
-17
lines changed Expand file tree Collapse file tree 8 files changed +32
-17
lines changed Original file line number Diff line number Diff line change 1
- .editorconfig export-ignore
2
- .gitattributes export-ignore
3
- /.github / export-ignore
4
- .gitignore export-ignore
5
- /.php_cs .dist export-ignore
6
- /phpunit.xml.dist export-ignore
7
- /tests / export-ignore
1
+ .editorconfig export-ignore
2
+ .gitattributes export-ignore
3
+ /.github / export-ignore
4
+ .gitignore export-ignore
5
+ /.php-cs-fixer .dist.php export-ignore
6
+ /phpunit.xml.dist export-ignore
7
+ /tests / export-ignore
Original file line number Diff line number Diff line change 8
8
strategy :
9
9
max-parallel : 10
10
10
matrix :
11
- php : [ '7.2', '7. 3', '7.4']
11
+ php : [ '7.3', '7.4']
12
12
13
13
steps :
14
14
- name : Set up PHP
28
28
run : ./vendor/bin/http_test_server > /dev/null 2>&1 &
29
29
30
30
- name : Run tests
31
- run : ./vendor/bin/phpunit
31
+ run : composer test
32
32
33
33
lowest :
34
34
name : Lowest deps
Original file line number Diff line number Diff line change 24
24
- name : PHP-CS-Fixer
25
25
uses : docker://oskarstark/php-cs-fixer-ga
26
26
with :
27
- args : --dry-run --diff-format udiff
27
+ args : --dry-run
28
28
29
29
psalm :
30
30
name : Psalm
Original file line number Diff line number Diff line change 2
2
/composer.lock
3
3
/phpunit.xml
4
4
/vendor /
5
+ .phpunit.result.cache
Original file line number Diff line number Diff line change 2
2
3
3
$ finder = PhpCsFixer \Finder::create ()
4
4
->exclude ('vendor ' )
5
- ->in (__DIR__ )
6
- ;
5
+ ->in (__DIR__ );
6
+ $ config = new PhpCsFixer \ Config () ;
7
7
8
- return PhpCsFixer \Config:: create ( )
8
+ return $ config -> setFinder ( $ finder )
9
9
->setRules ([
10
10
'@Symfony ' => true ,
11
11
'array_syntax ' => ['syntax ' => 'short ' ],
12
- ])
13
- ->setFinder ($ finder );
12
+ ]);
Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( http://keepachangelog.com/en/1.0.0/ )
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## [ Unreleased]
9
+ ### Changed
10
+ - Drop support for PHP version 7.2
11
+
12
+ ### Fixed
13
+ - Add missing ` composer test ` command and use it in CI
14
+ - Fix deprecated usage of prophesize in phpunit tests
15
+
8
16
## [ 1.0.0] - 2021-03-09
9
17
10
18
- Stable release - no changes since 0.1.1
Original file line number Diff line number Diff line change 11
11
}
12
12
],
13
13
"require" : {
14
- "php" : " ^7.2 | ^8.0" ,
14
+ "php" : " ^7.3 | ^8.0" ,
15
15
"php-http/httplug" : " ^2.0" ,
16
16
"psr/http-client" : " ^1.0" ,
17
17
"guzzlehttp/guzzle" : " ^7.0"
18
18
},
19
19
"require-dev" : {
20
20
"phpunit/phpunit" : " ^8.0|^9.3" ,
21
- "php-http/client-integration-tests" : " ^3.0"
21
+ "php-http/client-integration-tests" : " ^3.0" ,
22
+ "phpspec/prophecy-phpunit" : " ^2.0"
22
23
},
23
24
"provide" : {
24
25
"php-http/client-implementation" : " 1.0" ,
39
40
"branch-alias" : {
40
41
"dev-master" : " 1.x-dev"
41
42
}
43
+ },
44
+ "scripts" : {
45
+ "test" : " @php vendor/bin/phpunit"
42
46
}
43
47
}
Original file line number Diff line number Diff line change 8
8
use GuzzleHttp \Promise \RejectedPromise ;
9
9
use Http \Adapter \Guzzle7 \Promise ;
10
10
use PHPUnit \Framework \TestCase ;
11
+ use Prophecy \PhpUnit \ProphecyTrait ;
11
12
use Psr \Http \Message \RequestInterface ;
12
13
13
14
/**
14
15
* @author Márk Sági-Kazár <[email protected] >
15
16
*/
16
17
class PromiseTest extends TestCase
17
18
{
19
+ use ProphecyTrait;
20
+
18
21
public function testNonDomainExceptionIsHandled (): void
19
22
{
20
23
$ this ->expectException (Exception::class);
You can’t perform that action at this time.
0 commit comments