Skip to content

Releases: codemonster-ru/session

Release v2.0.0

29 Dec 17:08

Choose a tag to compare

Added

  • Payload encryption (libsodium), key rotation, and plaintext auto-migration.
  • TTL support: putWithTtl, ttl, expiresAt, touch, touchAll, sweepExpired.
  • Namespaced sessions, SessionScope, and SessionManager (non-static API).
  • New handlers: Redis, Redis Cluster, Redis Sentinel, Predis, PSR-16 Cache.
  • Retry/backoff for Redis/Predis/Cache handlers.
  • Helpers: keysMatch, dump redaction, size, count, and debug tools.
  • CI: PHP matrix on Linux/Windows/macOS, static analysis, coverage, Redis integration, stress tests.
  • Docs: security policy, checklist, migration guide, production configs.

Fixed

  • Session ID validation and fixation protection.
  • Session destroy no longer starts a new session and clears cookie by default.
  • File handler locking and mkdir failure handling.
  • JSON encode/decode errors now surface as exceptions.

Changed

  • ArraySessionHandler now stores raw payload strings.
  • Cookie defaults auto-detect HTTPS and enforce secure for SameSite=None.

Release v1.1.0

15 Nov 19:55

Choose a tag to compare

Added

  • Implemented support for user session ID via the SESSION_ID cookie.
  • Added automatic setting of the cookie at session start.
  • The session system now stores the ID between requests.

Fixed

  • Fixed a critical bug where each session was re-created on each request.
  • Fixed desynchronized behavior between Session::start() and session().
  • Fixed incorrect Store behavior where session data was never saved or re-read.

Changed

  • Updated Store::__construct() logic — the session ID is now read from the cookie.
  • Store::start() logic now sets the session cookie on first run.
  • Session::store() no longer creates a new Store each time and works reliably.

Release v1.0.0

24 Oct 15:01

Choose a tag to compare

Added

  • Session facade — simple static API to manage sessions in any PHP project:

    • Session::start() — initializes a session with file or array handler.
    • Session::get(), Session::put(), Session::forget(), Session::all(), Session::destroy().
  • Store class — encapsulates individual session state and serialization logic (JSON-based).

  • Session handlers:

    • FileSessionHandler — stores session data as JSON files.
    • ArraySessionHandler — in-memory session handler, useful for CLI or testing.
    • Full compatibility with native PHP SessionHandlerInterface.
  • Custom handler support — pass any handler implementing SessionHandlerInterface.