liip/hyphenator-bundle
Symfony bundle that adds automatic hyphenation to templates via a Twig filter, wrapping the Org\Heigl\Hyphenator library. Configure locales, patterns, and quality settings inYAML, then let long words wrap cleanly in rendered HTML, emails, and PDF output.
hyphens: auto plus a correct lang attribute. Any surface that doesn't run a modern browser engine — PDF generators (DomPDF, wkhtmltopdf), email clients, EPUB, server-rendered image cards/OG previews — cannot rely on CSS. That's the only place this decision genuinely bites.Org_Heigl_Hyphenator). Given its status, the real decision is skip or build a ~50–100 line service wrapper around the underlying library. Treat typographic polish as a small, bounded scope item — not a dependency worth architectural debate.Consider it only in one narrow case:
Look elsewhere — or skip entirely — in every other case:
hyphens: auto with correct lang attributes. Zero dependencies, better performance, browser dictionaries are well maintained. This covers the majority of "we should hyphenate" requests.org_heigl/hyphenator directly through a thin wrapper you own. Skip the Symfony bundle layer entirely — the bundle adds DI configuration and a Twig filter, which is roughly the code you'd write yourself in an afternoon.To executives: We evaluated a library for improving text layout in narrow and print-style surfaces. It's deprecated, archived since 2015, and has no active users or maintainers — adopting it would create an unsupported dependency with no security response path. The recommendation is to not adopt. Where the need is real, we get the same outcome from browser-native CSS at zero cost, or from a small in-house wrapper (~1 day of engineering) around the underlying hyphenation library for PDF and email surfaces. Net: no roadmap impact, no new vendor risk, one small optional scope item if a locale launch requires it.
To engineering: Do not add liip/hyphenator-bundle to any new or upgraded application. For legacy apps already using it, keep it until the next Symfony/PHP upgrade, then replace with a thin service wrapping org_heigl/hyphenator directly — the bundle contributes DI wiring and a Twig filter, nothing you can't own in under 100 lines. For web surfaces, delete the dependency and use hyphens: auto with correct lang attributes. For PDF/email, prefer the renderer's native hyphenation before writing anything.
Decision: Rejected for adoption. Logged as a known legacy dependency; replacement scoped as a ~1-day cleanup item, not a project.
How can I help you explore Laravel packages today?