-
-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #1144 Fix implicit nullable types to avoid PHP 8.4 warnings (…
…eiriksm, acrobat) This PR was squashed before being merged into the 3.14-dev branch. Discussion ---------- Commits ------- 9bd8e00 Fix implicit nullable types to avoid PHP 8.4 warnings ad84a65 Fix a param that was not supposed to be nullable a35a829 Update ci.yml 297f04e Fixes with phpcbf 1b63598 Fix implicit nullable case in tests 6d145f5 Fix upstream deprecation warnings
- Loading branch information
Showing
17 changed files
with
32 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
use Github\HttpClient\Message\ResponseMediator; | ||
use GuzzleHttp\Psr7\Response; | ||
use GuzzleHttp\Psr7\Utils; | ||
|
||
/** | ||
* @author Tobias Nyholm <[email protected]> | ||
|
@@ -16,7 +17,7 @@ public function testGetContent() | |
$response = new Response( | ||
200, | ||
['Content-Type' => 'application/json'], | ||
\GuzzleHttp\Psr7\stream_for(json_encode($body)) | ||
Utils::streamFor(json_encode($body)) | ||
); | ||
|
||
$this->assertEquals($body, ResponseMediator::getContent($response)); | ||
|
@@ -31,7 +32,7 @@ public function testGetContentNotJson() | |
$response = new Response( | ||
200, | ||
[], | ||
\GuzzleHttp\Psr7\stream_for($body) | ||
Utils::streamFor($body) | ||
); | ||
|
||
$this->assertEquals($body, ResponseMediator::getContent($response)); | ||
|
@@ -46,7 +47,7 @@ public function testGetContentInvalidJson() | |
$response = new Response( | ||
200, | ||
['Content-Type' => 'application/json'], | ||
\GuzzleHttp\Psr7\stream_for($body) | ||
Utils::streamFor($body) | ||
); | ||
|
||
$this->assertEquals($body, ResponseMediator::getContent($response)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
namespace Github\Tests\Mock; | ||
|
||
use GuzzleHttp\Psr7\Response; | ||
use GuzzleHttp\Psr7\Utils; | ||
|
||
/** | ||
* @author Tobias Nyholm <[email protected]> | ||
|
@@ -18,10 +19,10 @@ public function __construct($loopCount, array $content = []) | |
$this->loopCount = $loopCount; | ||
$this->content = $content; | ||
|
||
parent::__construct(200, ['Content-Type' => 'application/json'], \GuzzleHttp\Psr7\stream_for(json_encode($content))); | ||
parent::__construct(200, ['Content-Type' => 'application/json'], Utils::streamFor(json_encode($content))); | ||
} | ||
|
||
public function getHeader($header) | ||
public function getHeader($header): array | ||
{ | ||
if ($header === 'Link') { | ||
if ($this->loopCount > 1) { | ||
|
@@ -38,7 +39,7 @@ public function getHeader($header) | |
return parent::getHeader($header); | ||
} | ||
|
||
public function hasHeader($header) | ||
public function hasHeader($header): bool | ||
{ | ||
if ($header === 'Link') { | ||
return true; | ||
|