ezsystems/templated-uri-bundle
Symfony bundle for the Hautelook TemplatedUriRouter library, adding an RFC-6570-compliant router and URL generator. It exposes the hautelook.router.template service so you can generate templated links with expressions such as {page} and {&sort*}. Install via Composer and register the bundle in y...
_links) so clients can discover parameterized endpoints — pagination, sorting, filtering, sparse fieldsets — instead of hard-coding URLs. This is a foundational decision for any product positioning itself as "API-first."hautelook/TemplatedUriRouter (essentially service registration plus a formatter). "Buy" is trivially cheap, but the bundle is archived. The realistic decision is build a ~50–100 LOC adapter over a maintained RFC-6570 library (Guzzle URI template, League URI, or rize/uri-template), or skip templating if native route generation suffices.AppKernel.php, Flex, hautelook.router.template service ID), not a Laravel package. For a Laravel product, it is a reference implementation only; the RFC-6570 concept transfers, the code does not. This shapes whether the team evaluates it at all.Consider it (as a reference, not a dependency) when:
/demo?{&page}{&sort*}{&filter*} from $router->generate('route', ['page' => '{page}', 'sort' => ['{sort}']]).Look elsewhere when:
TemplatedUriGenerator interface.--ignore-platform-reqs is a red flag, not a workaround.Executive summary: This is a small, archived Symfony bundle that exposes an RFC-6570 URI-template router. The capability — server-advertised, parameterized URLs that let clients build API calls without hard-coded endpoints — is valuable for hypermedia-style APIs and reduces client churn when routes evolve. The package itself should not become a dependency: it is unmaintained, has essentially no adoption, and targets legacy Symfony, making it a poor fit for our Laravel/current-PHP stack. Recommendation: adopt the pattern, reject the dependency. Budget a small engineering task to implement a thin adapter over a maintained RFC-6570 library, and treat this repository as a design reference.
For engineering: The concept is a route-aware template generator: given a named route and parameters, emit RFC-6570-compliant templates for hypermedia payloads. Implementation surface is small. The plan: (1) confirm the product actually needs templates versus Laravel's native route()/url() generation, (2) pick a maintained RFC-6570 implementation (Guzzle URI template, League URI, rize/uri-template), (3) expose it behind an application-owned interface and service provider — never leak Symfony bundle conventions into Laravel, (4) add contract tests covering expansion, encoding, optional vs. missing variables, array parameters ({var*}), and caching, (5) roll out behind a feature flag with a documented exit path. Run a Composer dependency and license audit before any design work — including verifying what this package (ezsystems/templated-uri-bundle) actually is relative to the Hautelook upstream it documents, since provenance and canonical-package naming are inconsistent.
Key open questions to resolve before committing: Is templating required application-wide or only for a handful of external/API links? Do we need RFC-6570 specifically, or would conventional query strings with documented parameters suffice? Who owns the adapter long-term? And what is the fallback — maintained library, in-house expansion, or drop the feature — if compatibility fails?
How can I help you explore Laravel packages today?