session icon indicating copy to clipboard operation
session copied to clipboard

Version 6 - Roadmap

Open odan opened this issue 3 years ago • 0 comments

Here are some initial ideas:

  • Provide interface for each concern.
    • Add SessionManagerInterface to handle session operations, such as start, save, destroy, getName, etc.
    • Reduce SessionInterface to handle session data operations only, e.g. get, set
  • Make session settings "immutable"
  • Remove SessionAwareInterface in favor of dependency injection
  • Require PHP 8.0+

Example usage

$config = [
    'name' => 'app',
];

$session = new Odan\Session\PhpSession($config);

$session->start();

$session->set('key', 'test123')

// test123
$value = $session->get('key');

$flash = $session->getFlash();
$flash->add('error', 'Invalid username or password');

// This is now optional
$session->save();

odan avatar Sep 14 '22 19:09 odan