mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 08:23:45 +00:00
* [php] Backport #21458 to php client Fixes #21485 Credits to @jozefbriss * [php] Fix deprecation warning when running integration tests OpenAPI\Client\FakeHttpClient::setResponse(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead --------- Co-authored-by: simonhammes <simonhammes@users.noreply.github.com>
This commit is contained in:
parent
7d3913f1dd
commit
d69714f197
@ -113,8 +113,12 @@ class FormDataProcessor
|
||||
$currentName .= $currentSuffix;
|
||||
}
|
||||
|
||||
if (is_resource($val)) {
|
||||
$result[$currentName] = $val;
|
||||
} else {
|
||||
$result[$currentName] = ObjectSerializer::toString($val);
|
||||
}
|
||||
}
|
||||
|
||||
$currentName = $start;
|
||||
}
|
||||
|
@ -121,8 +121,12 @@ class FormDataProcessor
|
||||
$currentName .= $currentSuffix;
|
||||
}
|
||||
|
||||
if (is_resource($val)) {
|
||||
$result[$currentName] = $val;
|
||||
} else {
|
||||
$result[$currentName] = ObjectSerializer::toString($val);
|
||||
}
|
||||
}
|
||||
|
||||
$currentName = $start;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class FakeHttpClient implements ClientInterface
|
||||
/**
|
||||
* @param null|ResponseInterface $response
|
||||
*/
|
||||
public function setResponse(ResponseInterface $response = null)
|
||||
public function setResponse(?ResponseInterface $response = null)
|
||||
{
|
||||
$this->response = $response;
|
||||
}
|
||||
|
@ -121,8 +121,12 @@ class FormDataProcessor
|
||||
$currentName .= $currentSuffix;
|
||||
}
|
||||
|
||||
if (is_resource($val)) {
|
||||
$result[$currentName] = $val;
|
||||
} else {
|
||||
$result[$currentName] = ObjectSerializer::toString($val);
|
||||
}
|
||||
}
|
||||
|
||||
$currentName = $start;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user