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

@@ -23,6 +23,10 @@ class Connection
{
private $host;
private $contextProviders;
/**
* @var resource|null
*/
private $socket;
/**
@@ -31,7 +35,7 @@ class Connection
*/
public function __construct(string $host, array $contextProviders = [])
{
if (false === strpos($host, '://')) {
if (!str_contains($host, '://')) {
$host = 'tcp://'.$host;
}
@@ -64,7 +68,7 @@ class Connection
return true;
}
if (!$socketIsFresh) {
stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR);
fclose($this->socket);
$this->socket = $this->createSocket();
}
@@ -78,7 +82,7 @@ class Connection
return false;
}
private static function nullErrorHandler($t, $m)
private static function nullErrorHandler(int $t, string $m)
{
// no-op
}
@@ -87,7 +91,7 @@ class Connection
{
set_error_handler([self::class, 'nullErrorHandler']);
try {
return stream_socket_client($this->host, $errno, $errstr, 3, STREAM_CLIENT_CONNECT | STREAM_CLIENT_ASYNC_CONNECT);
return stream_socket_client($this->host, $errno, $errstr, 3, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT);
} finally {
restore_error_handler();
}