Skip to content

Commit cad499e

Browse files
authored
feature KnpLabs#1025 Php8.1 support (acrobat)
This PR was squashed before being merged into the 3.4.x-dev branch. Discussion ---------- Commits ------- 1b8b3ba Test against php 8.1 bd57aec Fixed php 8.1 warnings and phpunit 10 depercation
1 parent 9727c60 commit cad499e

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php-versions: ['7.2', '7.3', '7.4', '8.0']
14+
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']
1515

1616
steps:
1717
- uses: actions/checkout@v2

test/Github/Tests/Api/PullRequestTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ public function shouldShowStatusesFromPullRequest()
144144
$expectedArray['_links']['statuses']['href'] = '/repos/ezsystems/ezpublish/pulls/15/statuses';
145145

146146
$api = $this->getApiMock();
147-
$api->expects($this->at(0))
148-
->method('get')
149-
->with('/repos/ezsystems/ezpublish/pulls/15')
150-
->will($this->returnValue($expectedArray));
151147

152-
$api->expects($this->at(1))
148+
$api->expects($this->exactly(2))
153149
->method('get')
154-
->with('/repos/ezsystems/ezpublish/pulls/15/statuses')
155-
->will($this->returnValue($expectedArray));
150+
->withConsecutive(
151+
[$this->equalTo('/repos/ezsystems/ezpublish/pulls/15')],
152+
[$this->equalTo('/repos/ezsystems/ezpublish/pulls/15/statuses')]
153+
)
154+
->willReturn($expectedArray)
155+
;
156156

157157
$this->assertEquals($expectedArray, $api->status('ezsystems', 'ezpublish', '15'));
158158
}

test/Github/Tests/HttpClient/Plugin/GithubExceptionThrowerTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Github\Exception\ExceptionInterface;
66
use Github\HttpClient\Plugin\GithubExceptionThrower;
7+
use GuzzleHttp\Psr7\Request;
78
use GuzzleHttp\Psr7\Response;
89
use Http\Client\Promise\HttpFulfilledPromise;
910
use Http\Client\Promise\HttpRejectedPromise;
@@ -17,14 +18,11 @@
1718
class GithubExceptionThrowerTest extends TestCase
1819
{
1920
/**
20-
* @param ResponseInterface $response
21-
* @param ExceptionInterface|\Exception|null $exception
2221
* @dataProvider responseProvider
2322
*/
24-
public function testHandleRequest(ResponseInterface $response, ExceptionInterface $exception = null)
23+
public function testHandleRequest(ResponseInterface $response, ExceptionInterface $exception = null): void
2524
{
26-
/** @var RequestInterface $request */
27-
$request = $this->getMockForAbstractClass(RequestInterface::class);
25+
$request = new Request('GET', 'https://api.github.com/issues');
2826

2927
$promise = new HttpFulfilledPromise($response);
3028

0 commit comments

Comments
 (0)