php-flasher/flasher-symfony
Symfony integration for PHPFlasher that lets you show flash messages and toast notifications through a simple, framework-native API. Publish notifications from controllers or services and render them in your Twig templates with minimal setup.
Architecture fit. php-flasher/flasher-symfony is a thin Symfony bundle that binds the php-flasher/flasher core into Symfony's service container, Twig runtime, and session-based notification storage. It is not a Laravel package. For a Laravel-centric roadmap the correct artifact is php-flasher/flasher-laravel (service provider, Blade directives, Laravel session); pulling the Symfony bundle into a Laravel service is an architectural mismatch. The realistic fit is a hybrid PHP estate where Symfony services exist alongside Laravel ones, and we want a single notification vocabulary (success/error/info toast semantics) across both.
Integration feasibility. Low effort in the intended target: composer require php-flasher/flasher-symfony, register the bundle, configure the adapter (Toastr, Notyf, SweetAlert, PNotify, etc.), call the Flasher trait from controllers, render the Twig helper. The friction is not the PHP wiring — it is front-end asset delivery and the session dependency. Notifications are queued in session and rendered on the next page load, so the model does not translate to stateless JSON APIs or decoupled SPAs without an extra bridge.
Technical risk.
[READ-ONLY], a subtree split of the php-flasher monorepo. Issues, PRs, and releases originate upstream; this repo is a distribution surface, not a project. Any diligence must target the monorepo's health, not this repo's.Key questions.
flasher-laravel have the same maturity profile?Stack fit. Valid only for Symfony 5.4–7.x with Twig and PHP 8.x. It presupposes Symfony Flex/DI conventions and a session-backed request lifecycle. It does not fit Laravel, Slim, or API-only services. Treat it as a Symfony-vertical decision, not an enterprise standard.
Migration path. Incremental and low-blast-radius:
$this->addFlash() / inline SweetAlert2 calls behind a single application-level notifier interface.Compatibility. Verify the transitive constraint on php-flasher/flasher core and whether it conflicts with our Symfony minor/patch pins. Watch for Symfony deprecations in the DI extension and Twig extension. Because this is a split repo, the version we require resolves through Packagist from upstream releases; confirm the split tag cadence matches upstream tags before pinning.
Sequencing.
flasher-laravel for the Laravel estate — do not assume parity just because both exist under the same monorepo.Maintenance. Low code surface, but non-zero governance. We must monitor the upstream monorepo, not this read-only mirror, for releases and security patches, and we cannot file issues here. Budget a small recurring allowance for version bumps tied to Symfony upgrades. Pin exact versions and commit the lockfile.
Support. Community-only, MIT, no vendor SLA, no commercial backing evident. Internal ownership must be explicit: one team named as steward, a runbook covering bundle registration, asset configuration, and adapter selection. Escalation path is upstream issues plus our own fork — plan for the latter to be a real option, not a paper one.
Scaling. Runtime cost is negligible: session reads/writes and a small Twig render per request. Real scaling constraints are (a) session storage — must be Redis/database-backed and shared across nodes, or notifications vanish or duplicate depending on which node serves the follow-up request; and (b) asset weight — each adapter ships JS/CSS, so bundle size and page-weight budgets need review, especially if multiple adapters are enabled across apps.
Failure modes.
ServiceNotFoundException at boot (loud, caught in CI).Ramp-up. Developer onboarding is measured in hours: the API is a trait plus a Twig helper, and the core library's docs cover adapters. The organizational ramp-up is longer — establishing the notifier abstraction, the notification taxonomy, the asset/CSP story, and the "who watches upstream" ownership. Realistically one sprint of TPM-plus-tech-lead effort to standardize, then near-zero marginal cost per service. The dominant risk is not technical complexity; it is the maturity profile of a low-signal, single-maintainer dependency sitting in a user-facing UX path.
How can I help you explore Laravel packages today?