elektro-potkan/session-version

Ensures session data structure is compatible with current app version

v1.0.0 2021-09-29 22:07 UTC

This package is auto-updated.

Last update: 2024-04-29 04:34:29 UTC


README

Ensures session data structure (accessed using Nette Framework) is compatible with current app version.

Usage

// $session is an instance of Nette\Http\Session
$session->onStart[] = [new ElektroPotkan\SessionVersion\Checker('MyApp_v4.57.2-rc1'), 'check'];

It is neccessary to register the Checker into Session as early as possible. If any code tries to manipulate the session before, the onStart event will be missed and the too-late-registered checker will not be called.

Using Nette DI

services:
	- ElektroPotkan\SessionVersion\Checker('MyApp_v4.57.2-rc1')
	session.session:
		setup:
			- '$onStart[]' = [@ElektroPotkan\SessionVersion\Checker, check]

Author

Elektro-potkan git@elektro-potkan.cz

Info

Versioning

This project uses Semantic Versioning 2.0.0 (semver.org).

Branching

This project uses slightly modified Git-Flow Workflow and Branching Model:

License

You may use this program under the terms of either the BSD Zero Clause License or the GNU General Public License (GPL) version 3 or later.

See file LICENSE.