mapado/twig-extensions-bundle
A Symfony bundle that bundles useful Twig extensions from the Mapado Twig Extensions library into your application, adding handy filters and functions to templates with minimal setup and configuration.
parse_url() template helper, or do we own ~20 lines of code?" For nearly every team the answer is own it — the package's entire value is saving an engineer an afternoon, weighed against indefinite license and maintenance exposure.NOASSERTION license, this is a clean worked example for defining org-wide adoption gates: SPDX-cleared license, evidence of maintenance, version-constraint compatibility, and usage/adoption signal. Use it to calibrate the bar for all micro-dependencies, not just this one.NOASSERTION-licensed dependency to a Laravel codebase that doesn't even run Twig creates audit surface with zero compensating value — a concrete input to supply-chain policy and security-review criteria.Consider it only as a reference, not a dependency. The code is small enough to read in minutes; the honest use is to look at how parse_url() is exposed as a Twig filter and then implement that yourself. Adoption as a runtime dependency is defensible only when all of the following hold:
NOASSERTION license — this is a hard gate for anything distributed or commercial; unresolved, it is a blocker.Look elsewhere — or build in-house — when:
parse_url wrapper. A Blade directive, view composer, or controller-precomputed value delivers the same result with zero external risk.NOASSERTION fails distribution and commercial redistribution review.For executives: This is a tiny open-source utility that exposes one Twig template helper for parsing URLs. It is free, but it has effectively zero adoption (0 stars, 0 dependents) and its license could not be automatically identified — a legal red flag for shipping in a product. It is also built for Symfony, not our Laravel stack, so it wouldn't work out of the box anyway. Recommendation: do not add it as a production dependency. The capability is trivial to reproduce internally — roughly a day of engineering — which removes the legal ambiguity and the long-term maintenance risk at essentially no cost. The decision to make is a governance one: agree on adoption gates (clear license, some evidence of use, version compatibility) so micro-dependencies don't slip in elsewhere.
For engineering: The package is a Symfony bundle that registers a single Twig extension exposing parse_url(). On Laravel/Blade there is no supported path — Twig only enters the picture via a third-party bridge we don't run, and the bundle wrapper (Symfony kernel + DI concept) is dead weight regardless. The reusable part is one framework-agnostic extension class. Plan: if a product needs URL parsing in views, either precompute it in the controller/service layer, or write a small first-party helper (Blade directive or a native Twig extension registered through our view layer) with tests for valid, relative, and malformed URLs. If we choose to reuse upstream code, copy the class with attribution into our own namespace under our license header, pin it, and document ownership — no Composer dependency, no upstream support expectation, no SBOM exposure. Close the ticket outright if Twig isn't already in the target app.
How can I help you explore Laravel packages today?