Skip to content

Commit

Permalink
Add support for Symfony 4
Browse files Browse the repository at this point in the history
  • Loading branch information
RikudouSage committed Oct 19, 2021
1 parent 24bec32 commit a700804
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/Session/DynamoDbSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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));
}
Expand Down

0 comments on commit a700804

Please sign in to comment.