1
0
Fork
You've already forked session
0
Duon session library
  • PHP 100%
Thomas Ernst 1875a94927
All checks were successful
ci / ci (push) Successful in 1m14s
Update README badges
2026年06月10日 21:22:55 +02:00
.forgejo/workflows Allow manual CI runs 2026年06月10日 20:58:19 +02:00
.github Add GitHub mirror README 2026年06月10日 21:14:39 +02:00
docs Update docs tooling 2026年05月12日 15:00:38 +02:00
src Keep explicit session array type 2026年06月10日 20:09:21 +02:00
tests The big rename 2026年05月11日 14:07:23 +02:00
.editorconfig Sync shared config files 2026年01月30日 21:59:16 +01:00
.gitattributes Update .gitattributes 2026年04月27日 12:46:58 +02:00
.gitignore Update coverage paths 2026年04月27日 10:48:06 +02:00
CHANGELOG.md Release v0.2.0 2026年06月10日 18:00:22 +02:00
composer.json Add lint composer script 2026年06月10日 20:32:13 +02:00
LICENSE.md Update license 2026年05月12日 20:33:50 +02:00
mago.toml Update mago config 2026年06月10日 20:00:05 +02:00
phpunit.xml.dist Update coverage config 2026年05月12日 19:55:35 +02:00
psalm.xml.dist Use xml.dist config names 2026年05月11日 14:55:02 +02:00
README.md Update README badges 2026年06月10日 21:22:55 +02:00

Celemas Sessions

ci code coverage type coverage psalm level Software License

Helper classes for native PHP sessions, flash messages, and CSRF.

Installation

composer require celemas/session

Documentation

Start here: docs/index.md.

Quick start

use Celemas\Session\Session;
$session = new Session();
$session->start();
$session->set('user_id', 123);
$userId = $session->get('user_id');
$session->flash->add('Signed in.');
$token = $session->csrf->token('profile');

Session merges custom options with secure defaults for Secure and HttpOnly cookies, SameSite=Lax, strict session IDs, cookie-only session IDs, disabled transparent session IDs, and PHP's nocache session cache limiter. Set cookie_secure to false only for intentional plain HTTP environments, such as local development without TLS.

License

This project is licensed under the MIT license.