From a700804b507986507c9f86940eaca0cc7a2344b8 Mon Sep 17 00:00:00 2001 From: Dominik Chrastecky Date: Tue, 19 Oct 2021 16:43:32 +0200 Subject: [PATCH] Add support for Symfony 4 --- composer.json | 4 ++-- src/Session/DynamoDbSessionHandler.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 525fa1c..8d96834 100644 --- a/composer.json +++ b/composer.json @@ -5,10 +5,10 @@ "minimum-stability": "stable", "license": "MIT", "require": { - "symfony/framework-bundle": "^5.0", + "symfony/framework-bundle": "^4.4 | ^5.0", "rikudou/psr6-dynamo-db": "^2.0", "php": "^7.2 | ^8.0", - "symfony/cache": "^5.0", + "symfony/cache": "^4.4 | ^5.0", "ext-json": "*" }, "autoload": { diff --git a/src/Session/DynamoDbSessionHandler.php b/src/Session/DynamoDbSessionHandler.php index 20b599b..88482e3 100644 --- a/src/Session/DynamoDbSessionHandler.php +++ b/src/Session/DynamoDbSessionHandler.php @@ -60,12 +60,12 @@ public function updateTimestamp($key, $val): bool return $this->cache->save($item); } - protected function doRead(string $sessionId): string + protected function doRead($sessionId): string { return (string) $this->getCacheItem($sessionId)->get(); } - protected function doWrite(string $sessionId, string $data): bool + protected function doWrite($sessionId, $data): bool { $item = $this->getCacheItem($sessionId); $item->set($data); @@ -74,7 +74,7 @@ protected function doWrite(string $sessionId, string $data): bool return $this->cache->save($item); } - protected function doDestroy(string $sessionId): bool + protected function doDestroy($sessionId): bool { return $this->cache->deleteItem($this->getCacheKey($sessionId)); }