upgrade to laravel 7 and set branch to v2

This commit is contained in:
2020-12-25 11:22:15 +00:00
parent 516105c492
commit 0ddd298350
4638 changed files with 132501 additions and 190226 deletions
@@ -2,9 +2,9 @@
namespace Illuminate\Http;
use Exception;
use Symfony\Component\HttpFoundation\HeaderBag;
use Illuminate\Http\Exceptions\HttpResponseException;
use Symfony\Component\HttpFoundation\HeaderBag;
use Throwable;
trait ResponseTrait
{
@@ -18,7 +18,7 @@ trait ResponseTrait
/**
* The exception that triggered the error response (if applicable).
*
* @var \Exception|null
* @var \Throwable|null
*/
public $exception;
@@ -59,7 +59,7 @@ trait ResponseTrait
*
* @param string $key
* @param array|string $values
* @param bool $replace
* @param bool $replace
* @return $this
*/
public function header($key, $values, $replace = true)
@@ -96,7 +96,7 @@ trait ResponseTrait
*/
public function cookie($cookie)
{
return call_user_func_array([$this, 'withCookie'], func_get_args());
return $this->withCookie(...func_get_args());
}
/**
@@ -108,7 +108,7 @@ trait ResponseTrait
public function withCookie($cookie)
{
if (is_string($cookie) && function_exists('cookie')) {
$cookie = call_user_func_array('cookie', func_get_args());
$cookie = cookie(...func_get_args());
}
$this->headers->setCookie($cookie);
@@ -129,10 +129,10 @@ trait ResponseTrait
/**
* Set the exception to attach to the response.
*
* @param \Exception $e
* @param \Throwable $e
* @return $this
*/
public function withException(Exception $e)
public function withException(Throwable $e)
{
$this->exception = $e;
@@ -142,6 +142,8 @@ trait ResponseTrait
/**
* Throws the response in a HttpResponseException instance.
*
* @return void
*
* @throws \Illuminate\Http\Exceptions\HttpResponseException
*/
public function throwResponse()