typo3fluid/fluid
TYPO3Fluid is a standalone PHP templating engine extracted from TYPO3 CMS. It provides secure, flexible templates with ViewHelpers, layouts, sections and partials, plus extensibility and caching, making it suitable for MVC apps and reusable component rendering.
Decoupling Frontend Logic from Backend Logic: Adopting Fluid enables a clear separation between PHP business logic and HTML templates, improving maintainability and developer productivity. Teams can now delegate UI rendering to non-developers (e.g., designers) while keeping backend logic in PHP.
Component-Based Architecture: Fluid’s ViewHelper API and component listings (introduced in v4.6+) align with modern frontend frameworks like React/Vue, allowing teams to adopt a micro-frontend or component-driven approach. This supports roadmap items for modular UI development.
Build vs. Buy:
StrictArgumentProcessor) and CLI tooling (e.g., fluid warmup) than rolling out a custom solution.Use Cases:
✅ Your team needs type-safe templating with PHP 8+ support (e.g., union types, iterable validation).
✅ You’re building a component library or design system where reusable UI blocks are critical.
✅ Your project requires CLI-driven template optimization (e.g., cache warmup, linting via fluid analyze).
✅ You need fine-grained control over HTML escaping (e.g., UnsafeHTML interface for trusted content).
✅ Your stack includes TYPO3 CMS or you want interoperability with TYPO3’s ecosystem.
❌ You’re all-in on Laravel Blade and don’t need Fluid’s advanced features (e.g., component listings). ❌ Your team lacks PHP 8+ or struggles with Fluid’s learning curve (e.g., ViewHelper syntax). ❌ You prioritize JavaScript-heavy SPAs over server-rendered templates (consider Inertia.js or Livewire instead). ❌ Your project is static-site-focused (use Twig or Jinja for simpler needs).
*"Fluid is a battle-tested templating engine (used by TYPO3 CMS) that lets us build scalable, componentized UIs while keeping frontend and backend teams independent. It’s like React’s JSX for PHP—but with type safety, CLI tooling, and zero JavaScript lock-in. For example:
*"Fluid gives us:
*.fluid.html fallback chain).UnsafeHTML for trusted content).Tradeoff: Steeper learning curve than Blade, but pays off for large-scale apps or design-system projects."*
Key Ask: "Let’s pilot Fluid for our [component library/CMS integration] and measure dev velocity vs. Blade/Twig."
How can I help you explore Laravel packages today?