diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2b440ad..19f7612 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,24 +1,25 @@
name: CI
-on: [push, pull_request]
+on:
+ push:
+ pull_request:
permissions:
contents: read
actions: read
- id-token: none
jobs:
composer:
runs-on: ubuntu-latest
strategy:
matrix:
- php: [ 8.2, 8.3, 8.4 ]
+ php: [ 8.2, 8.3, 8.4, 8.5 ]
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Cache Composer dependencies
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
@@ -27,6 +28,7 @@ jobs:
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php }}
+ php_extensions: pcntl
- name: Archive build
run: mkdir /tmp/github-actions/ && tar --exclude=".git" -cvf /tmp/github-actions/build.tar ./
@@ -36,13 +38,14 @@ jobs:
with:
name: build-artifact-${{ matrix.php }}
path: /tmp/github-actions
+ retention-days: 1
phpunit:
runs-on: ubuntu-latest
needs: [ composer ]
strategy:
matrix:
- php: [ 8.2, 8.3, 8.4 ]
+ php: [ 8.2, 8.3, 8.4, 8.5 ]
outputs:
coverage: ${{ steps.store-coverage.outputs.coverage_text }}
@@ -77,7 +80,7 @@ jobs:
needs: [ phpunit ]
strategy:
matrix:
- php: [ 8.2, 8.3, 8.4 ]
+ php: [ 8.2, 8.3, 8.4, 8.5 ]
steps:
- uses: actions/checkout@v4
@@ -92,13 +95,16 @@ jobs:
- name: Upload to Codecov
uses: codecov/codecov-action@v5
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ slug: ${{ github.repository }}
phpstan:
runs-on: ubuntu-latest
needs: [ composer ]
strategy:
matrix:
- php: [ 8.2, 8.3, 8.4 ]
+ php: [ 8.2, 8.3, 8.4, 8.5 ]
steps:
- uses: actions/download-artifact@v4
@@ -114,13 +120,15 @@ jobs:
with:
php_version: ${{ matrix.php }}
path: src/
+ level: 6
+ memory_limit: 256M
phpmd:
runs-on: ubuntu-latest
needs: [ composer ]
strategy:
matrix:
- php: [ 8.2, 8.3, 8.4 ]
+ php: [ 8.2, 8.3, 8.4, 8.5 ]
steps:
- uses: actions/download-artifact@v4
@@ -132,7 +140,7 @@ jobs:
run: tar -xvf /tmp/github-actions/build.tar ./
- name: PHP Mess Detector
- uses: php-actions/phpmd@v2
+ uses: php-actions/phpmd@v1
with:
php_version: ${{ matrix.php }}
path: src/
@@ -144,7 +152,7 @@ jobs:
needs: [ composer ]
strategy:
matrix:
- php: [ 8.2, 8.3, 8.4 ]
+ php: [ 8.2, 8.3, 8.4, 8.5 ]
steps:
- uses: actions/download-artifact@v4
@@ -161,21 +169,3 @@ jobs:
php_version: ${{ matrix.php }}
path: src/
standard: phpcs.xml
-
- remove_old_artifacts:
- runs-on: ubuntu-latest
-
- permissions:
- actions: write
-
- steps:
- - name: Remove old artifacts for prior workflow runs on this repository
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
- while read id
- do
- echo -n "Deleting artifact ID $id ... "
- gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
- done
-
+
## Example usage: Welcome a user by their first name or log out the user
@@ -44,7 +44,7 @@ else {
## Redis session storage
-This package now includes `Gt\Session\RedisHandler` for shared session storage.
+This package now includes `GT\Session\RedisHandler` for shared session storage.
It works with Redis-compatible backends such as Redis and Valkey, and is intended
for deployments where application nodes are disposable and session state needs to
survive traffic moving between servers.
@@ -56,7 +56,7 @@ Example production config:
```ini
[session]
-handler=Gt\Session\RedisHandler
+handler=GT\Session\RedisHandler
save_path=rediss://default:secret@example-redis.internal:25061/0?prefix=GT:&ttl=1440
name=GT
use_cookies=true
diff --git a/composer.json b/composer.json
index 33e918a..d11c730 100644
--- a/composer.json
+++ b/composer.json
@@ -8,7 +8,7 @@
"phpgt/typesafegetter": "^1.3"
},
"suggest": {
- "ext-redis": "Required to use Gt\\Session\\RedisHandler."
+ "ext-redis": "Required to use GT\\Session\\RedisHandler."
},
"require-dev": {
"phpstan/phpstan": "^2.1",
@@ -19,7 +19,7 @@
"scripts": {
"phpunit": "vendor/bin/phpunit --configuration phpunit.xml",
- "phpstan": "vendor/bin/phpstan analyse --level 6 src",
+ "phpstan": "vendor/bin/phpstan analyse --level 6 src --memory-limit 256M",
"phpcs": "vendor/bin/phpcs src --standard=phpcs.xml",
"phpmd": "vendor/bin/phpmd src/ text phpmd.xml",
"test": [
@@ -32,12 +32,13 @@
"autoload": {
"psr-4": {
+ "GT\\Session\\": "./src",
"Gt\\Session\\": "./src"
}
},
"autoload-dev": {
"psr-4": {
- "Gt\\Session\\Test\\": "./test/phpunit"
+ "GT\\Session\\Test\\": "./test/phpunit"
}
},
diff --git a/composer.lock b/composer.lock
index 42fa268..807a21f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -589,11 +589,11 @@
},
{
"name": "phpstan/phpstan",
- "version": "2.1.40",
+ "version": "2.1.51",
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b",
- "reference": "9b2c7aeb83a75d8680ea5e7c9b7fca88052b766b",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc3b523c45e714c70de2ac5113b958223b55dc59",
+ "reference": "dc3b523c45e714c70de2ac5113b958223b55dc59",
"shasum": ""
},
"require": {
@@ -638,7 +638,7 @@
"type": "github"
}
],
- "time": "2026-02-23T15:04:35+00:00"
+ "time": "2026-04-21T18:22:01+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -2207,16 +2207,16 @@
},
{
"name": "symfony/config",
- "version": "v7.4.7",
+ "version": "v7.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5"
+ "reference": "2d19dde43fa2ff720b9a40763ace7226594f503b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/6c17162555bfb58957a55bb0e43e00035b6ae3d5",
- "reference": "6c17162555bfb58957a55bb0e43e00035b6ae3d5",
+ "url": "https://api.github.com/repos/symfony/config/zipball/2d19dde43fa2ff720b9a40763ace7226594f503b",
+ "reference": "2d19dde43fa2ff720b9a40763ace7226594f503b",
"shasum": ""
},
"require": {
@@ -2262,7 +2262,7 @@
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/config/tree/v7.4.7"
+ "source": "https://github.com/symfony/config/tree/v7.4.8"
},
"funding": [
{
@@ -2282,20 +2282,20 @@
"type": "tidelift"
}
],
- "time": "2026-03-06T10:41:14+00:00"
+ "time": "2026-03-24T13:12:05+00:00"
},
{
"name": "symfony/dependency-injection",
- "version": "v7.4.7",
+ "version": "v7.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db"
+ "reference": "f7025fd7b687c240426562f86ada06a93b1e771d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db",
- "reference": "0f651e58f4917fb0e2cd261ccbfe3d71e6e0f5db",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f7025fd7b687c240426562f86ada06a93b1e771d",
+ "reference": "f7025fd7b687c240426562f86ada06a93b1e771d",
"shasum": ""
},
"require": {
@@ -2346,7 +2346,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/dependency-injection/tree/v7.4.7"
+ "source": "https://github.com/symfony/dependency-injection/tree/v7.4.8"
},
"funding": [
{
@@ -2366,7 +2366,7 @@
"type": "tidelift"
}
],
- "time": "2026-03-03T07:48:48+00:00"
+ "time": "2026-03-31T06:50:29+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -2437,16 +2437,16 @@
},
{
"name": "symfony/filesystem",
- "version": "v7.4.6",
+ "version": "v7.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e"
+ "reference": "58b9790d12f9670b7f53a1c1738febd3108970a5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/3ebc794fa5315e59fd122561623c2e2e4280538e",
- "reference": "3ebc794fa5315e59fd122561623c2e2e4280538e",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/58b9790d12f9670b7f53a1c1738febd3108970a5",
+ "reference": "58b9790d12f9670b7f53a1c1738febd3108970a5",
"shasum": ""
},
"require": {
@@ -2483,7 +2483,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/filesystem/tree/v7.4.6"
+ "source": "https://github.com/symfony/filesystem/tree/v7.4.8"
},
"funding": [
{
@@ -2503,20 +2503,20 @@
"type": "tidelift"
}
],
- "time": "2026-02-25T16:50:00+00:00"
+ "time": "2026-03-24T13:12:05+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.33.0",
+ "version": "v1.36.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
+ "reference": "141046a8f9477948ff284fa65be2095baafb94f2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
- "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2",
+ "reference": "141046a8f9477948ff284fa65be2095baafb94f2",
"shasum": ""
},
"require": {
@@ -2566,7 +2566,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.36.0"
},
"funding": [
{
@@ -2586,20 +2586,20 @@
"type": "tidelift"
}
],
- "time": "2024-09-09T11:45:10+00:00"
+ "time": "2026-04-10T16:19:22+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.33.0",
+ "version": "v1.36.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
+ "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
- "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315",
+ "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315",
"shasum": ""
},
"require": {
@@ -2651,7 +2651,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.36.0"
},
"funding": [
{
@@ -2671,7 +2671,7 @@
"type": "tidelift"
}
],
- "time": "2024-12-23T08:48:59+00:00"
+ "time": "2026-04-10T17:25:58+00:00"
},
{
"name": "symfony/service-contracts",
@@ -2762,16 +2762,16 @@
},
{
"name": "symfony/var-exporter",
- "version": "v7.4.0",
+ "version": "v7.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-exporter.git",
- "reference": "03a60f169c79a28513a78c967316fbc8bf17816f"
+ "reference": "398907e89a2a56fe426f7955c6fa943ec0c77225"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f",
- "reference": "03a60f169c79a28513a78c967316fbc8bf17816f",
+ "url": "https://api.github.com/repos/symfony/var-exporter/zipball/398907e89a2a56fe426f7955c6fa943ec0c77225",
+ "reference": "398907e89a2a56fe426f7955c6fa943ec0c77225",
"shasum": ""
},
"require": {
@@ -2819,7 +2819,7 @@
"serialize"
],
"support": {
- "source": "https://github.com/symfony/var-exporter/tree/v7.4.0"
+ "source": "https://github.com/symfony/var-exporter/tree/v7.4.8"
},
"funding": [
{
@@ -2839,7 +2839,7 @@
"type": "tidelift"
}
],
- "time": "2025-09-11T10:15:23+00:00"
+ "time": "2026-03-24T13:12:05+00:00"
},
{
"name": "theseer/tokenizer",
diff --git a/src/FileHandler.php b/src/FileHandler.php
index 34eb12c..71f82c1 100644
--- a/src/FileHandler.php
+++ b/src/FileHandler.php
@@ -1,5 +1,5 @@
*/
diff --git a/src/SessionContainer.php b/src/SessionContainer.php
index aab32f8..68d121c 100644
--- a/src/SessionContainer.php
+++ b/src/SessionContainer.php
@@ -1,5 +1,5 @@