elektro-potkan / session-version
Ensures session data structure is compatible with current app version
Requires
- php: >= 7.2
- nette/http: ^3.1.3
- nette/utils: ^3.0.1
Requires (Dev)
- phpstan/phpstan: ^0.12
- phpstan/phpstan-deprecation-rules: ^0.12
- phpstan/phpstan-nette: ^0.12
- phpstan/phpstan-strict-rules: ^0.12
This package is auto-updated.
Last update: 2025-03-01 00:36:16 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:
- https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
- https://nvie.com/posts/a-successful-git-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.