ezsystems/templated-uri-router
A Symfony URL generator that outputs RFC 6570 templated URIs, letting you build links with placeholders like /demo{?page,sort*,filter*} from route parameters. It's a small, naive implementation that covers basic needs only.
/demo{?page,sort*,filter*} — which is exactly the shape of decision a PM faces when designing pagination, filtering, and sorting links for a hypermedia or discovery-driven API. Seeing a concrete generator makes that design conversation tractable.links, or client-side SDK generation where clients fill in parameters, RFC 6570 is the underlying contract. This repo lets you prototype the contract in an afternoon and validate whether your consumers actually want expandable links versus plain URLs.ezsystems namespace). If this appears anywhere in an estate audit, it belongs on the modernization backlog, not the dependency inventory.Consider it only in these narrow cases:
{?}, {&}, {*}, {+}) map onto route parameters and array values.Look elsewhere — or build — if any of the following is true:
new TemplateGenerator($routes, $context)) ties you to that era's API.guzzle/uri-template-style libraries and their successors) before assuming you must write your own.To executives: We evaluated this package and do not recommend adopting it. It is an archived, single-maintainer, self-described incomplete library built for a framework version that has been end-of-life since 2018, with essentially no user base. The strategic value is not the code — it is confirmation that RFC 6570 URI templates are a real, standardized option for our API link design. Recommendation: fund a small internal spike (days, not weeks) to validate the consumer benefit, then implement against a maintained library or in-house. Estimated adoption risk if we took the dependency anyway: unpatched vulnerabilities with no upstream to fix them, and an eventual forced migration — the same work, done later and under pressure.
To engineering: Treat this as a spec reference, not a dependency. Read Rfc6570Generator to understand how route parameters and array values map to template operators, then either adopt a maintained expander or write ~200 lines against RFC 6570 with the test vectors you actually need. The MIT license permits reuse of ideas and code, but if you vendor it you own it — including the PHP 8 and framework-upgrade work the original authors never did. One caveat worth flagging: the distribution namespace (ezsystems) differs from the README's origin (hautelook), so provenance has already changed hands once; verify licensing and origin before copying anything verbatim.
To product and design: The user-facing question this package lets us answer cheaply is whether our API should return one fixed URL per resource or a template clients fill in (pagination, sort, filter). Templates reduce payload size and give clients flexibility; they also complicate caching, gateway rules, and analytics. Prototype both, measure with two or three real integrators, and decide on evidence — the library itself is a prototyping tool at best, and should be deleted from the codebase once the decision is made.
How can I help you explore Laravel packages today?