Resolve implicit null deprecation in PHP 8.4 #22
commit.yml
on: push
Code Style (PSR-12)
10s
Matrix: Infection Check
Matrix: Static Analysis Check
Matrix: Unit Tests
Annotations
20 warnings
Unit Tests (8.4)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Unit Tests (8.2)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Unit Tests (8.3)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Code Style (PSR-12)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Static Analysis Check (8.1)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Static Analysis Check (8.2)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Static Analysis Check (8.3)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Static Analysis Check (8.4)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Unit Tests (8.1)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Infection Check (8.4)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Infection Check (8.4):
src/Exception/SocketException.php#L16
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
*/
public function __construct(string|Socket|null $message = null)
{
- if ($message instanceof Socket) {
+ if (true) {
$errno = socket_last_error($message);
} elseif (!$message) {
$errno = socket_last_error();
|
Infection Check (8.4):
src/Exception/SocketException.php#L27
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
return;
}
$error = socket_strerror($errno);
- parent::__construct($error, $errno);
+
if (!$message) {
socket_clear_error();
} else {
|
Infection Check (8.4):
src/Exception/SocketException.php#L29
Escaped Mutant for Mutator "LogicalNot":
--- Original
+++ New
@@ @@
}
$error = socket_strerror($errno);
parent::__construct($error, $errno);
- if (!$message) {
+ if ($message) {
socket_clear_error();
} else {
socket_clear_error($message);
|
Infection Check (8.4):
src/Exception/SocketException.php#L32
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
if (!$message) {
socket_clear_error();
} else {
- socket_clear_error($message);
+
}
}
}
|
Infection Check (8.4):
src/Server.php#L122
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
* @param ?int $timeout Seconds to wait on a socket before timing it out
* @throws SocketException
*/
- public function __construct(string $address, int $port = 0, ?int $timeout = 0)
+ public function __construct(string $address, int $port = -1, ?int $timeout = 0)
{
$this->address = $address;
$this->port = $port;
|
Infection Check (8.4):
src/Server.php#L122
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
* @param ?int $timeout Seconds to wait on a socket before timing it out
* @throws SocketException
*/
- public function __construct(string $address, int $port = 0, ?int $timeout = 0)
+ public function __construct(string $address, int $port = 1, ?int $timeout = 0)
{
$this->address = $address;
$this->port = $port;
|
Infection Check (8.4):
src/Server.php#L122
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
* @param ?int $timeout Seconds to wait on a socket before timing it out
* @throws SocketException
*/
- public function __construct(string $address, int $port = 0, ?int $timeout = 0)
+ public function __construct(string $address, int $port = 0, ?int $timeout = -1)
{
$this->address = $address;
$this->port = $port;
|
Infection Check (8.4):
src/Server.php#L149
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
*/
public function start() : void
{
- set_time_limit(0);
+ set_time_limit(-1);
$this->masterSocket = Socket::create($this->domain, SOCK_STREAM, 0);
$this->masterSocket->bind($this->address, $this->port);
$this->masterSocket->getSockName($this->address, $this->port);
|
Infection Check (8.4):
src/Server.php#L149
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
*/
public function start() : void
{
- set_time_limit(0);
+ set_time_limit(1);
$this->masterSocket = Socket::create($this->domain, SOCK_STREAM, 0);
$this->masterSocket->bind($this->address, $this->port);
$this->masterSocket->getSockName($this->address, $this->port);
|
Infection Check (8.4):
src/Server.php#L149
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
*/
public function start() : void
{
- set_time_limit(0);
+
$this->masterSocket = Socket::create($this->domain, SOCK_STREAM, 0);
$this->masterSocket->bind($this->address, $this->port);
$this->masterSocket->getSockName($this->address, $this->port);
|