ustal / stream-hub-symfony-bridge
Twig bridge for Stream Hub slot rendering
Package info
github.com/ustal/stream-hub-symfony-bridge
pkg:composer/ustal/stream-hub-symfony-bridge
Requires
- php: ^8.2
- twig/twig: ^3.0
- ustal/stream-hub-core: ^0.3
Requires (Dev)
- deptrac/deptrac: ^3.0
- phpunit/phpunit: ^10.0
README
Twig bridge package for the Stream Hub ecosystem.
Current Scope
The package currently provides two bridge primitives:
- the Twig function
render_slot(...) TwigViewRenderer, which implementsViewRendererInterfacefromstream-hub-core
render_slot(...) delegates slot rendering to SlotRendererInterface from stream-hub-core and marks the returned HTML as safe for Twig output.
Example:
{{ render_slot(slot, runtime, context) }}
TwigViewRenderer is the Twig-backed view engine that widgets use through the generic ViewRendererInterface.
This package currently focuses on Twig-level rendering helpers and template rendering primitives. Symfony bundle wiring and service registration belong in stream-hub-symfony-bundle.
Development
Install dependencies:
make install
Run tests:
make test
Run deptrac:
make deptrac