diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 897ea0c..c434ac7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ 7.4, 8.0, 8.1, 8.2 ] + php: [ 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5 ] redis-version: [4, 5, 6] steps: - uses: actions/checkout@v2 diff --git a/src/Kdyby/Redis/DI/Config/RedisSchema.php b/src/Kdyby/Redis/DI/Config/RedisSchema.php index c90d43a..b271642 100644 --- a/src/Kdyby/Redis/DI/Config/RedisSchema.php +++ b/src/Kdyby/Redis/DI/Config/RedisSchema.php @@ -40,7 +40,7 @@ public function normalize($value, \Nette\Schema\Context $context) } } - $value['clients'][NULL] = $client; + $value['clients'][''] = $client; return $this->getSchema()->normalize($value, $context); } @@ -94,7 +94,7 @@ private function getSchema(): \Nette\Schema\Schema 'clients' => \Nette\Schema\Expect::arrayOf( new \Kdyby\Redis\DI\Config\ClientSchema($this->builder) )->default([ - NULL => [ + '' => [ 'host' => '127.0.0.1', 'port' => \Kdyby\Redis\RedisClient::DEFAULT_PORT, 'timeout' => 10, diff --git a/src/Kdyby/Redis/DI/RedisExtension.php b/src/Kdyby/Redis/DI/RedisExtension.php index c0f1e9e..1c7b599 100644 --- a/src/Kdyby/Redis/DI/RedisExtension.php +++ b/src/Kdyby/Redis/DI/RedisExtension.php @@ -86,7 +86,7 @@ protected function buildClient(?string $name, array $config): \Nette\DI\Definiti $client->setAutowired(FALSE); } - $this->configuredClients[$name] = $config; + $this->configuredClients[$name ?: ''] = $config; $client->addSetup('setupLockDuration', [$config['lockDuration'], $config['lockAcquireTimeout']]); $client->addSetup('setConnectionAttempts', [$config['connectionAttempts']]); @@ -163,7 +163,7 @@ protected function loadSession(array $config): void $builder = $this->getContainerBuilder(); - $clientConfig = $config['clients'][NULL]; + $clientConfig = $config['clients']['']; $sessionConfig = \Nette\DI\Config\Helpers::merge(\is_array($config['session']) ? $config['session'] : [], [ 'host' => $clientConfig['host'],