phil / onboarding-bundle
The welcome of a new member, for Symfony: flows of ordered steps completed by hand, by an event, by a checker or by an answer the application turns into roles and subscriptions, each user's progress kept under their identifier, and an accessible checklist and guided tour, in English and French
Package info
github.com/parler-haut-interagir-librement/onboarding-bundle
Type:symfony-bundle
pkg:composer/phil/onboarding-bundle
Requires
- php: >=8.5
- ext-mbstring: *
- doctrine/dbal: ^4.5
- doctrine/orm: ^3.7
- psr/clock: ^1.0
- psr/event-dispatcher: ^1.0
- symfony/config: ^8.2
- symfony/dependency-injection: ^8.2
- symfony/http-foundation: ^8.2
- symfony/security-csrf: ^8.2
- symfony/service-contracts: ^3.6
Requires (Dev)
- ext-pdo: *
- doctrine/doctrine-bundle: ^3.3
- phil/privacy-bundle: ^0.1@dev
- phil/settings-bundle: ^0.1@dev
- phil/ux-kit: >=0.5.0-alpha <1.0
- phpunit/phpunit: ^13.4
- psr/log: ^3.0
- symfony/asset-mapper: ^8.2
- symfony/browser-kit: ^8.2
- symfony/clock: ^8.2
- symfony/css-selector: ^8.2
- symfony/dom-crawler: ^8.1
- symfony/event-dispatcher: ^8.2
- symfony/event-dispatcher-contracts: ^3.6
- symfony/framework-bundle: ^8.2
- symfony/http-kernel: ^8.2
- symfony/routing: ^8.2
- symfony/security-core: ^8.2
- symfony/translation: ^8.2
- symfony/twig-bridge: ^8.2
- symfony/twig-bundle: ^8.2
- symfony/ux-twig-component: ^3.7
- symfony/yaml: ^8.2
- twig/twig: ^3.21
Suggests
- doctrine/doctrine-bundle: To keep the progress of each user in the application's database
- phil/privacy-bundle: For a user's progress in the export and the erasure of their data
- phil/settings-bundle: To let each user turn the guided tours off in their preferences
- phil/ux-kit: For the recipe Button the checklist and the tour draw, through the Symfony UX Toolkit
- symfony/asset-mapper: To serve the Stimulus controller and its stylesheet without a build step
- symfony/routing: For the endpoints that mark a step done or skipped, dismiss and reset a flow
- symfony/security-core: To name the current user from the authenticated user
- symfony/stimulus-bundle: For the guided tour
- symfony/twig-bundle: For the checklist and the tour in templates
- symfony/ux-twig-component: For the checklist and the tour, whose buttons are a recipe of the kit, and their components
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-15 03:41:16 UTC
README
The welcome of a new member, for Symfony: steps in order, a checklist and a guided tour.
phil/onboarding-bundle walks a new member through the first things to do on a site. The application and its packages declare onboarding flows, by configuration or attribute: ordered steps, each with a title, the route it leads to, the element of the page a guided tour points out, and how it gets done — ticked by the person, completed when a Symfony event is dispatched, completed when a checker of the application says so, or answered: a question whose choices the application turns into roles and subscriptions, through a port, the bundle never writing them itself. The bundle keeps where each user stands, step by step, and shows it two ways: a checklist that works without JavaScript, and a guided tour that highlights each step's target in turn. A person may skip a step, put a flow away and start it again. Labels come in English and French.
It is for a site that opens to new members, authors or customers and wants them to find their way: filling in a profile, writing a first page, joining a group. The progress is kept under the user identifier the application names its users by, whatever its user class, so the bundle works with Symfony Security or any other sign-in.
The bundle is built on Doctrine ORM, Symfony's dependency injection, HTTP foundation and stateless CSRF protection.
Twig, Symfony UX Twig Component, the Stimulus bundle, AssetMapper, Symfony Security and phil/settings-bundle are
optional: the checklist and the tour are semantic HTML whose buttons are the recipe Button of the kit, installed in
the application by the Symfony UX Toolkit; with the settings bundle, each user may turn the tours off. The
Onboarding service sits on the ProgressRepository port, with Doctrine and in-memory stores; it keeps no state
between requests and is safe in a long-running worker.
Status
| Part | State |
|---|---|
Flows and steps by configuration and attribute, ordered by before and after, checked when the container is built |
Implemented and tested |
| Completion by hand, by a Symfony event, by a checker of the application, by an answer | Implemented and tested |
Questions whose choices grant roles and subscriptions through AnswerGrants |
Implemented and tested |
Progress, kept with Doctrine or in memory, one row per user and flow |
Implemented and tested |
Onboarding: progress, complete, mark done, answer, skip, dismiss, reset, forget; events made of identifiers |
Implemented and tested |
| Endpoints that tick, answer, skip, dismiss and reset, with a stateless CSRF token | Implemented and tested |
The checklist and the tour: Twig functions, the components PhilOnboarding:Checklist and PhilOnboarding:Tour, the Stimulus controller and its stylesheet, the recipe Button of the kit, English and French |
Implemented and tested |
The setting onboarding.tours of phil/settings-bundle |
Implemented and tested |
The export and erasure of a user's progress through phil/privacy-bundle |
Implemented and tested |
| The Flex recipe: the bundle, its configuration and its routes | Written in recipe/0.1, for the recipes repository of PHIL |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, enabling the bundle, the Flex recipe, the table, the routes, the recipe of the kit, the assets. |
| Configuration | Every option, with an example. |
| Flows and steps | Declaring flows and steps, their order, the four completions and questions, reading and changing the progress. |
| The checklist and the tour | The Twig functions and components, the controller, the keyboard, screen readers and reduced motion, the look. |
| Events | The events dispatched, and what they carry. |
| Extension points | The ports, the declarations, the services and the events. |
| Testing | The bundle's tests, and how to test code that uses flows. |
| Reference | Every class and file of the bundle. |
Quick start
composer require phil/onboarding-bundle php bin/console ux:install button --kit=github.com/parler-haut-interagir-librement/ux-kit
# config/packages/phil_onboarding.yaml phil_onboarding: flows: author: title: onboarding.author.title steps: profile: { title: onboarding.author.profile, route: app_profile, target: '#profile-form' } first-page: { title: onboarding.author.first_page, completion: event, event: App\Event\PageWritten }
<twig:PhilOnboarding:Checklist flow="author" /> <twig:PhilOnboarding:Tour flow="author" />
$onboarding->complete($user->getUserIdentifier(), 'author', 'profile'); $onboarding->progress($user->getUserIdentifier(), 'author')->percent(); // 50
Requirements
PHP 8.5 or later with mbstring; Doctrine ORM 3.7 and DBAL 4.5; Symfony 8.2's config, dependency injection, HTTP
foundation and CSRF protection; Symfony's service contracts 3.6; PSR-20's clock and PSR-14's event dispatcher. Twig,
Symfony Routing, Symfony UX Twig Component with the recipe Button of the kit, the Stimulus bundle, AssetMapper,
Symfony Security and phil/settings-bundle are optional.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.