Skip to content
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

PHP 8.4 Compatibility: Implicitly marking parameter as nullable is d… #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 lib/Core/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function utf8($value)
*
* @return string A querystring, essentially.
*/
public static function encodeQueryParams($arr, $prefix = null)
public static function encodeQueryParams($arr, string|null $prefix = null)
{
if (!is_array($arr)) {
return $arr;
Expand Down
8 changes: 4 additions & 4 deletions lib/RetryMiddlewareFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ private static function buildRetryDecider()
return function (
$retries,
\GuzzleHttp\Psr7\Request $request,
\GuzzleHttp\Psr7\Response $response = null,
\GuzzleHttp\Exception\TransferException $exception = null
\GuzzleHttp\Psr7\Response|null $response = null,
\GuzzleHttp\Exception\TransferException|null $exception = null
) {
if ($retries >= self::MAX_AUTOMATIC_TIMEOUT_RETRIES) {
return false;
Expand Down Expand Up @@ -78,7 +78,7 @@ private static function buildRetryDelay()
*
* @return boolean
*/
private static function isConnectionError(\GuzzleHttp\Exception\TransferException $exception = null)
private static function isConnectionError(\GuzzleHttp\Exception\TransferException|null $exception = null)
{
return $exception instanceof \GuzzleHttp\Exception\ConnectException;
}
Expand All @@ -90,7 +90,7 @@ private static function isConnectionError(\GuzzleHttp\Exception\TransferExceptio
*
* @return boolean
*/
private static function isRetryableServerError(\GuzzleHttp\Psr7\Response $response = null)
private static function isRetryableServerError(\GuzzleHttp\Psr7\Response|null $response = null)
{
if ($response) {
$statusCode = $response->getStatusCode();
Expand Down