Skip to content

Commit

Permalink
Merge f31f434 into 24bec32
Browse files Browse the repository at this point in the history
  • Loading branch information
RikudouSage committed Oct 19, 2021
2 parents 24bec32 + f31f434 commit 46f6e5e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
run: composer install
- name: Run static analysis
run: composer phpstan
tests:
name: Tests
tests_5x:
name: Tests (5.x)
runs-on: ubuntu-latest
steps:
- name: Setup PHP
Expand All @@ -48,6 +48,22 @@ jobs:
run: composer install
- name: Run tests
run: composer phpunit
tests_4x:
name: Tests (4.x)
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Checkout Code
uses: actions/checkout@v2
- name: Install Dependencies
run: composer install
- name: Install Symfony 4
run: composer require symfony/framework-bundle:^4.4 symfony/cache:^4.4
- name: Run tests
run: composer phpunit
coverage:
name: Report Coverage
runs-on: ubuntu-latest
Expand Down
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 46f6e5e

Please sign in to comment.