⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.
This bundle is FrankenPHP worker mode friendly.
Symfony bundle that makes Twig fragment sub-requests resilient when using {ignore_errors: true}.
- ✅ HTTP error tolerance —
{ignore_errors: true}also covers 403/404 (not only exceptions) - ✅ Twig fallback — configurable template (or empty string)
- ✅ Optional Sentry — report suppressed failures without breaking the parent page
- ✅ Flex recipe — ships
nowo_fragment_kitconfig - ✅ FrankenPHP demo — Symfony 8 single-container demo
FrankenPHP: Demos use a single PHP service (FrankenPHP, no nginx). Runtime mode is controlled by FRANKENPHP_MODE in .env (default worker). Set classic for per-request PHP / easier hot-reload (entrypoint swaps in Caddyfile.dev). Recreate the container after changing the mode — no image rebuild. See docs/DEMO-FRANKENPHP.md.
{{ render(controller(...), {ignore_errors: true}) }} only suppresses exceptions thrown during sub-requests. When the sub-request returns an HTTP error status (403, 404, …), FragmentHandler::deliver() throws a RuntimeException and the parent page still fails with a 500.
composer require nowo-tech/fragment-kit-bundleRegister the bundle (Flex does this automatically):
Nowo\FragmentKitBundle\NowoFragmentKitBundle::class => ['all' => true],{{ render(controller('App\\Controller\\WidgetController::index'), {ignore_errors: true}) }}- PHP
>= 8.2,< 8.6 - Symfony
^7.4 || ^8.0(CI covers 7.4, 8.0, 8.1) - Twig Bundle
- Installation
- Configuration
- Usage
- Contributing
- Code of Conduct
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
- GitHub Actions CI requirements
- Demo with FrankenPHP (includes worker mode)
- Server cookbook (Nginx, php-fpm, FrankenPHP)
| Version | PHP | Symfony | Status |
|---|---|---|---|
| 1.1.x | >= 8.2 | 7.4 – 8.1+ | Stable |
| 1.0.x | >= 8.2 | 7.4 – 8.1+ | Security / maintenance |
make -C demo up-symfony8 # http://localhost:8050 (default PORT)make test
make test-coverage- Tests: PHPUnit (unit + integration)
- PHP: 100% lines (
make test-coverage)
make setup-hooks
make up
make install
make release-checkMIT — see LICENSE.
