Skip to content
codemonster-ruPublic

About

PHP session management with pluggable handlers. Read-only Annabel package mirror.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

codemonster-ru/session

Important

This repository is read-only.

Development happens in the Annabel monorepo.

Issues and pull requests should be opened there.

Latest Version on Packagist Total Downloads License

Session store and pluggable session handlers for PHP applications.

Get started

Use PHP 8.2 or later and Composer 2.

composer require codemonster-ru/session

Documentation

Standalone package documentation: docs.codemonster.net/session

Annabel framework documentation: Annabel getting started guide

Session lifecycle

Store::regenerateId() keeps the session data and removes the old record by default. Pass false to retain the old record. Store::invalidate() always clears the data and requires the old record to be removed. A replacement cookie is sent after its record is written. Applications that require logout to win against concurrent requests must serialize the full session lifecycle per incoming ID. File replacement and individual Redis commands are atomic.

Custom handlers should return an empty string for an absent session and false for a failed read, write, or deletion. Failed operations fail the request when their exception reaches the application boundary. Malformed or undecryptable payloads raise UnreadableSession, which extends RuntimeException. A record successfully decrypted with a previous key is rewritten using the primary key.

Support and contributing

Read the contribution guide before proposing a change. Report vulnerabilities through the security policy.

Licensed under the MIT License.

About

PHP session management with pluggable handlers. Read-only Annabel package mirror.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages