nowo-tech / user-kit-bundle
Symfony bundle for user account enable/disable, last activity tracking, online presence, UI preferences, GDPR self-service and an opt-in session registry (list, revoke, concurrent-session limits).
Package info
github.com/nowo-tech/UserKitBundle
Type:symfony-bundle
pkg:composer/nowo-tech/user-kit-bundle
Fund package maintenance!
Requires
- php: >=8.2 <8.6
- doctrine/dbal: ^3.8 || ^4.0
- doctrine/doctrine-bundle: ^2.10 || ^3.0
- doctrine/orm: ^2.15 || ^3.0
- nowo-tech/form-kit-bundle: ^2.17
- nowo-tech/ui-kit-bundle: ^2.20
- psr/cache: ^2.0 || ^3.0
- psr/clock: ^1.0
- symfony/clock: ^7.4 || ^8.0
- symfony/config: ^7.4 || ^8.0
- symfony/console: ^7.4 || ^8.0
- symfony/dependency-injection: ^7.4 || ^8.0
- symfony/event-dispatcher: ^7.4 || ^8.0
- symfony/form: ^7.4 || ^8.0
- symfony/framework-bundle: ^7.4 || ^8.0
- symfony/http-foundation: ^7.4 || ^8.0
- symfony/http-kernel: ^7.4 || ^8.0
- symfony/property-access: ^7.4 || ^8.0
- symfony/routing: ^7.4 || ^8.0
- symfony/security-bundle: ^7.4 || ^8.0
- symfony/security-core: ^7.4 || ^8.0
- symfony/security-csrf: ^7.4 || ^8.0
- symfony/security-http: ^7.4 || ^8.0
- symfony/service-contracts: ^2.5 || ^3.0
- symfony/translation-contracts: ^3.5
- symfony/twig-bundle: ^7.4 || ^8.0
- twig/extra-bundle: ^3.12
- twig/string-extra: ^3.12
- twig/twig: ^3.12
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- igor-php/igor-php: ^0.10.0
- nowo-tech/phpstan-frankenphp: ^1.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.5
- rector/rector: ^2.0
- symfony/browser-kit: ^7.4 || ^8.0
- symfony/cache: ^7.4 || ^8.0
- symfony/css-selector: ^7.4 || ^8.0
- symfony/dom-crawler: ^7.4 || ^8.0
- symfony/messenger: ^7.4 || ^8.0
- symfony/translation: ^7.4 || ^8.0
- symfony/yaml: ^7.4 || ^8.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v1.16.0
- v1.15.0
- v1.14.2
- v1.14.1
- v1.14.0
- v1.13.2
- v1.13.1
- v1.13.0
- v1.12.0
- v1.11.1
- v1.11.0
- v1.10.1
- v1.10.0
- v1.9.1
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.13
- v1.1.12
- v1.1.11
- v1.1.10
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.3
- v1.0.1
- v1.0.0
- dev-feat/context-allowlist
- dev-feat/arch-001-b4
- dev-fix/worker-memo-a1
- dev-fix/arch-bar-w0
- dev-feat/ddd-ports
- dev-fix/session-touch-locking-read
- dev-fix/session-touch-found-rows
- dev-feat/session-adopt-deferred-revocation
- dev-fix/beacon-audit-1122
- dev-chore/symfony-security-2026-11-04
- dev-fix/1.10.1
- dev-chore/req-gaps-2
- dev-fix/sessions-sec-004-cc
- dev-feat/sessions
- dev-feat-content-width-wider
This package is auto-updated.
Last update: 2026-11-12 00:44:03 UTC
README
⭐ Found this useful? Install from Packagist and give the repo a star on GitHub.
Symfony bundle for user account lifecycle and presence: enable/disable accounts (UserChecker), throttled lastActivityAt updates, configurable online detection and an opt-in session registry (where am I signed in, sign out a device, concurrent-session limits).
Designed to complement nowo-tech/auth-kit-bundle without a hard Composer dependency.
This bundle is FrankenPHP worker mode friendly.
"My sessions" — every signed-in browser, the current one flagged |
Sign out another session — it is signed out on its next request |
Features
enabled/ disabled accounts —AccountStatusUserCheckerblocks login for disabled userslastActivityAt— updated on authenticated HTTP requests (throttled)online_threshold—UserPresenceResolver::isOnline()and optional Twiguser_is_online()- Named profiles — separate config per user entity (
User,Admin, …) with O(1) class resolution - Session invalidation hook — optional Doctrine listener that calls your
SessionInvalidatorInterfacewhen an account is disabled (default implementation is a no-op) - Optional traits —
EnabledUserTrait,LastActivityTrait - UI preferences —
UiPreferencesembeddable /UiPreferencesTrait(locale, theme, width, density, motion, font scale, contrast, sidebar, footer) and the Twiguser_ui_html_attributes()helper for<html>data-*attributes - Product tour progress —
ProductTourProgressembeddable / trait (markPageSeen(),hasSeenPage(),syncEnabledPages()) - GDPR self-service SPI (opt-in) — tagged export providers / erasers / erasure guards, versioned JSON
PersonalDataExporter, transactionalPersonalDataEraserwith veto hook - Session registry and limits (opt-in,
sessions.enabled) — one row per signed-in session (HMAC of the id only, browser / OS names, truncated IP), revoked sessions signed out on their next request with any session handler, "My sessions" and admin pages (UiKit + FormKit CSRF-only actions), sign out one / all others / everywhere, concurrent-session limit (evict_oldest/reject_new, per-user resolver), automatic sign-out on password change and account disable, audit events, retention purge command, GDPR export / erasure - Translations — domain
NowoUserKitBundle(de,en,es,fr,it,nl,pt)
Quick start
composer require nowo-tech/user-kit-bundle
# config/packages/nowo_user_kit.yaml nowo_user_kit: default_profile: default profiles: default: user_class: App\Entity\User account_status: enabled: true last_activity: enabled: true online_threshold: 300
The legacy flat layout (user_class at root) remains supported. See Configuration.
Session registry (opt-in; create the user_kit_session table with Doctrine Migrations, see Upgrading):
nowo_user_kit: sessions: enabled: true limit: { max_sessions: 5, policy: evict_oldest } web_ui: { enabled: true } # routes: type nowo_user_kit_sessions
Requirements
- PHP 8.2+
- Symfony 7.4 | 8.x
- Doctrine ORM;
nowo-tech/ui-kit-bundleandnowo-tech/form-kit-bundle(installed with the bundle; used by the session pages)
AuthKit coexistence
Login (AuthKit) → form_login → UserProvider → UserChecker (UserKit) → OK / blocked
Use the same user_class in both bundles. UserKit may inherit user_class from nowo_auth_kit.user_class when that parameter exists.
Demo
make -C demo up # Symfony 8.1 — http://localhost:8023
Login with demo@user-kit.test / demo, then open My sessions (sign in from a second browser to see two sessions).
Playwright e2e (login → My sessions → sign out another session) and the README screenshots run against the running demo (REQ-DEMO-013):
make test-e2e # official Playwright image, demo/symfony8/e2e make demo-screenshots # refresh docs/images/demo/*.webp
The demo runs under FrankenPHP in Docker. See demo/README.md and docs/DEMO-FRANKENPHP.md for development vs production setup, including FrankenPHP worker mode for production.
Development
make up make test-coverage-100 make phpstan make igor
Documentation
- Installation
- Configuration
- Usage — Standard Symfony host and DDD / hexagonal host
- Templates
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
- GitHub Actions CI requirements
- PSR evaluation (REQ-CS-007)
- Demo with FrankenPHP
- FrankenPHP worker audit
- Baseline product spec
- Code inventory
- UI preferences spec (002)
- Personal data (GDPR) spec (003)
- Session registry spec (004)
Tests and coverage
- PHP: 100% line coverage on
src/(verified viamake test-coverage-100) - Compatibility: PHP 8.2+ · Symfony 7.4 / 8.x (CI matrix)
Package
- Composer:
nowo-tech/user-kit-bundle - Config root:
nowo_user_kit


