this is php 8 and this error appears everytime from my incomingRequest.php file
the error states ```Deprecated: Required parameter $userAgent follows optional parameter $body``
the initial code
public function __construct($config, URI $uri = null, $body = 'php://input', UserAgent $userAgent)
{
// Get our body from php://input
if ($body === 'php://input')
{
$body = file_get_contents('php://input');
}
$this->body = ! empty($body) ? $body : null;
$this->config = $config;
$this->userAgent = $userAgent;
parent::__construct($config);
$this->populateHeaders();
this is php 8 and this error appears everytime from my incomingRequest.php file
the error states ```Deprecated: Required parameter $userAgent follows optional parameter $body``
the initial code
public function __construct($config, URI $uri = null, $body = 'php://input', UserAgent $userAgent)
{
// Get our body from php://input
if ($body === 'php://input')
{
$body = file_get_contents('php://input');
}
$this->body = ! empty($body) ? $body : null;
$this->config = $config;
$this->userAgent = $userAgent;
parent::__construct($config);
$this->populateHeaders();