Skip to content

Php8.1 support #1025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.2', '7.3', '7.4', '8.0']
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']

steps:
- uses: actions/checkout@v2
Expand Down
14 changes: 7 additions & 7 deletions test/Github/Tests/Api/PullRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ public function shouldShowStatusesFromPullRequest()
$expectedArray['_links']['statuses']['href'] = '/repos/ezsystems/ezpublish/pulls/15/statuses';

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

$api->expects($this->at(1))
$api->expects($this->exactly(2))
->method('get')
->with('/repos/ezsystems/ezpublish/pulls/15/statuses')
->will($this->returnValue($expectedArray));
->withConsecutive(
[$this->equalTo('/repos/ezsystems/ezpublish/pulls/15')],
[$this->equalTo('/repos/ezsystems/ezpublish/pulls/15/statuses')]
)
->willReturn($expectedArray)
;

$this->assertEquals($expectedArray, $api->status('ezsystems', 'ezpublish', '15'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Github\Exception\ExceptionInterface;
use Github\HttpClient\Plugin\GithubExceptionThrower;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
use Http\Client\Promise\HttpFulfilledPromise;
use Http\Client\Promise\HttpRejectedPromise;
Expand All @@ -17,14 +18,11 @@
class GithubExceptionThrowerTest extends TestCase
{
/**
* @param ResponseInterface $response
* @param ExceptionInterface|\Exception|null $exception
* @dataProvider responseProvider
*/
public function testHandleRequest(ResponseInterface $response, ExceptionInterface $exception = null)
public function testHandleRequest(ResponseInterface $response, ExceptionInterface $exception = null): void
{
/** @var RequestInterface $request */
$request = $this->getMockForAbstractClass(RequestInterface::class);
$request = new Request('GET', 'https://api.github.com/issues');

$promise = new HttpFulfilledPromise($response);

Expand Down