krystal-sf / ux-notify
Smart Notifications for Krystal Symfony Projects
1.0.x-dev
2026-08-04 23:04 UTC
Requires
- php: ^8.1
- krystal-sf/ux-blocks: ^1.0
- krystal-sf/ux-common: ^1.0
Requires (Dev)
- badpixxel/php-sdk: ^3.0
- krystal-sf/ux-menus: ^1.0
- phpunit/phpunit: ^10.0|^11.0
- symfony/debug-bundle: ^6.4|^7.4|^8.0
- symfony/monolog-bundle: ^3.0|^4.0
- symfony/stopwatch: ^6.4|^7.4|^8.0
- symfony/web-profiler-bundle: ^6.4|^7.4|^8.0
This package is auto-updated.
Last update: 2026-08-04 23:04:52 UTC
README
Smart notifications for Krystal Symfony UX Projects: session flashes and live events rendered as toasts (ToastR).
Installation
composer require krystal-sf/ux-notify
Enable the bundle in config/bundles.php:
return [
// ...
Ksf\Plugins\Notify\KsfNotifyBundle::class => ['all' => true],
];
Usage
Add the Notify:Controller component once in your page template:
<twig:Notify:Controller />
- Session flash messages are loaded & displayed automatically on page load.
- Live Components actions: session alerts are parsed after each action.
- Push a toast from anywhere with the
NotifyFlashBagEvents::ADDlive event. - Ajax flows can re-render session alerts by emitting the RENDER event.
Toast style & timeouts map from the alert type (success, warning,
error, info) — presets in MessageProcessor. Errors are persistent
(no timeout).
Testing
make up # boot the docker stack
make phpunit # run the test suite
make quality # lint + style + phpstan
License
MIT — see LICENSE.