Skip to content

Commit e2c3944

Browse files
committed
Compatability with php 8.4
Deprecate implicitly nullable parameter types https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
1 parent 8cadd6f commit e2c3944

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/Phpfastcache/Cluster/AggregatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function getCluster(int $strategy): ClusterPoolInterface;
8686
*
8787
* @return void
8888
*/
89-
public function aggregateDriverByName(string $driverName, ConfigurationOption $driverConfig = null): void;
89+
public function aggregateDriverByName(string $driverName, ?ConfigurationOption $driverConfig = null): void;
9090

9191
/**
9292
* @param AggregatablePoolInterface $driverPool

lib/Phpfastcache/Cluster/ClusterAggregator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function aggregateDriver(AggregatablePoolInterface $driverPool): void
9494
* @throws PhpfastcacheDriverNotFoundException
9595
* @throws PhpfastcacheLogicException
9696
*/
97-
public function aggregateDriverByName(string $driverName, ConfigurationOption $driverConfig = null): void
97+
public function aggregateDriverByName(string $driverName, ?ConfigurationOption $driverConfig = null): void
9898
{
9999
if (isset($this->cluster)) {
100100
throw new PhpfastcacheLogicException('The cluster has been already build, cannot aggregate more pools.');

lib/Phpfastcache/Drivers/Redis/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function getDatabase(): ?int
9898
* @return static
9999
* @throws PhpfastcacheLogicException
100100
*/
101-
public function setDatabase(int $database = null): static
101+
public function setDatabase(?int $database = null): static
102102
{
103103
return $this->setProperty('database', $database);
104104
}

lib/Phpfastcache/Exceptions/PhpfastcacheIOException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class PhpfastcacheIOException extends PhpfastcacheCoreException
2424
/**
2525
* @inheritdoc
2626
*/
27-
public function __construct(string $message = "", int $code = 0, \Throwable $previous = null)
27+
public function __construct(string $message = "", int $code = 0, ?\Throwable $previous = null)
2828
{
2929
$lastError = error_get_last();
3030
if ($lastError) {

lib/Phpfastcache/Helper/Psr16Adapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Psr16Adapter implements CacheInterface
4949
* @throws PhpfastcacheDriverException
5050
* @throws PhpfastcacheDriverNotFoundException
5151
*/
52-
public function __construct(string|ExtendedCacheItemPoolInterface $driver, ConfigurationOptionInterface $config = null)
52+
public function __construct(string|ExtendedCacheItemPoolInterface $driver, ?ConfigurationOptionInterface $config = null)
5353
{
5454
if ($driver instanceof ExtendedCacheItemPoolInterface) {
5555
if ($config !== null) {

0 commit comments

Comments
 (0)