sk/twig-extensions-bundle
A Twig extensions bundle for PHP applications that adds reusable Twig filters, functions, and utilities to streamline template rendering. Install via Composer to keep templates cleaner, more expressive, and easier to maintain.
ucfirst/lcfirst as both Twig filters and functions, closing a long-standing request (#3). If your roadmap includes template-level text formatting (title-casing labels, sentence-casing user-generated content, normalizing acronyms in emails/notifications), this is a low-cost "buy" rather than writing and maintaining custom Twig extensions in-house.{{ name|ucfirst }}) or is composed in PHP/controllers (functions). That's a genuine architectural choice worth recording in your templating standards.SKTwigExtensionsBundle, docs served from a Symfony bundle path), not a Laravel package. In a Laravel codebase — which ships Blade by default — adopting it means introducing Twig via a third-party bridge. That is a platform decision with real cost, not a package decision.Consider it when:
Look elsewhere when:
Str::ucfirst() call, or a small custom helper instead.ucfirst/lcfirst yourself is a few lines; pulling in a bundle and (in Laravel) a Twig bridge to get them is disproportionate.For executives: A small open-source PHP library shipped a minor update (v1.2.0). It adds two text-formatting helpers to templates and extends automated testing to an older PHP version. There is no breaking change and no migration required, so no action is needed from existing users. Commercially, this is housekeeping on a low-risk utility — it does not create or remove product capability. The one decision it surfaces is a platform-fit question: the library is built for Symfony/Twig, while our stack is Laravel/Blade. I recommend we do not adopt it, and instead handle these two string helpers with a couple of lines of native Laravel code. Adopting it would mean adding a Twig templating bridge purely to obtain two trivial helpers — cost and risk with no corresponding user-facing benefit.
For engineering: v1.2.0 adds a StringTwigExtension exposing ucfirst and lcfirst as both filters and functions, with per-feature docs, and adds PHP 7.1 to the test matrix. No deprecations, no removals, no config or API break — a safe patch-to-minor bump for anyone already depending on it. Two caveats worth logging: (1) the package is a Symfony bundle, so in Laravel it requires a Twig bridge and offers no service provider, facade, or Blade integration — evaluate as a templating-stack change, not a composer require; (2) the release only demonstrates testing on PHP 7.1, so confirm the supported PHP range against our runtime before relying on it. If we were already on Twig, the change is a one-line usage addition: {{ value|ucfirst }} or ucfirst(value). Recommendation: no adoption on Laravel; implement locally with Str::ucfirst() / Str::lcfirst() in a Blade directive for consistency and zero new dependencies.
How can I help you explore Laravel packages today?