marko / session
Session interfaces and infrastructure for Marko Framework
0.8.0
2026-05-27 16:19 UTC
Requires
- php: ^8.5
- marko/config: 0.8.0
- marko/core: 0.8.0
Requires (Dev)
- marko/testing: 0.8.0
- pestphp/pest: ^4.0
README
Session interfaces and infrastructure--defines session management, flash messages, and garbage collection without coupling to a storage backend.
Installation
composer require marko/session
Note: You also need a driver package. See marko/session-file or marko/session-database.
Quick Example
use Marko\Session\Contracts\SessionInterface; public function __construct( private readonly SessionInterface $session, ) {} public function handle(): void { $this->session->start(); $this->session->set('user_id', 42); $this->session->flash()->add('success', 'Profile updated.'); $this->session->save(); }
Documentation
Full usage, API reference, and examples: marko/session