Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -36,10 +36,14 @@ class CurlCommandFormatter implements Formatter
$body = $request->getBody();
if ($body->getSize() > 0) {
if ($body->isSeekable()) {
// escapeshellarg argument max length on Windows, but longer body in curl command would be impractical anyways
if ($body->getSize() > 8192) {
$data = '[too long stream omitted]';
} elseif ($body->isSeekable()) {
$data = $body->__toString();
$body->rewind();
if (preg_match('/[\x00-\x1F\x7F]/', $data)) {
// all non-printable ASCII characters and <DEL> except for \t, \r, \n
if (preg_match('/([\x00-\x09\x0C\x0E-\x1F\x7F])/', $data)) {
$data = '[binary stream omitted]';
}
} else {
@@ -65,10 +69,18 @@ class CurlCommandFormatter implements Formatter
}
/**
* @param RequestInterface $request
* Formats a response in context of its request.
*
* @return string
*/
public function formatResponseForRequest(ResponseInterface $response, RequestInterface $request)
{
return $this->formatResponse($response);
}
/**
* @return string
*/
private function getHeadersAsCommandOptions(RequestInterface $request)
{
$command = '';