Description
Which extension is this issue about ?
Couchbasev4
What type of issue is this?
Incompatibility (be specific)
Operating system + version
windows 11
PHP version
8.4
Connector/Database version (if applicable)
Files (Core)
Extension version (NOT THE PHPFASTCACHE VERSION)
v6
Phpfastcache version
9.2
Describe the issue you're facing
Hi team,
I'm using the latest version of phpfastcache/phpfastcache with PHP 8.4, and I'm encountering a deprecation warning due to an implicitly nullable parameter in the constructor of PhpfastcacheIOException.
PHP Version: 8.4
Phpfastcache version: Latest (^9.x)
OS: [Windows 11]
Composer version: version 2.8.6
Expected behavior
no warning: Deprecated: Phpfastcache\Exceptions\PhpfastcacheIOException::__construct(): Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead
Code sample (optional)
public function __construct(string $message = "", int $code = 0, \Throwable $previous = null)
{
$lastError = error_get_last();
if ($lastError) {
$message .= "\n";
$message .= "Additional information provided by error_get_last():\n";
$message .= "{$lastError['message']} in {$lastError['file']} line {$lastError['line']}";
}
parent::__construct($message, $code, $previous);
}
Suggestion to fix the issue (optional)
public function __construct(string $message = "", int $code = 0, ?\Throwable $previous = null)
References (optional)
No response
Do you have anything more you want to share? (optional)
No response
Have you searched in our Wiki before posting ?
- I have searched over the Wiki