Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Templated Uri Bundle

Templated Uri Bundle Laravel Package

ibexa/templated-uri-bundle

Symfony bundle (fork of hautelook/templated-uri-bundle) providing an RFC-6570 compatible templated URI router and URL generator. Exposes the hautelook.router.template service for generating templated route URLs.

View on GitHub
Deep Wiki
Context7

Ibexa Templated URI Bundle is a Symfony bundle (fork of hautelook/templated-uri-bundle) that integrates the TemplatedUriRouter library, providing an RFC-6570 compatible router and URL generator. It registers a hautelook.router.template service that renders routes as URI templates with placeholders such as {page}.

$container->get('hautelook.router.template')->generate('hautelook_demo_route', [
    'page'   => '{page}',
    'sort'   => ['{sort}'],
    'filter' => ['{filter}'],
]);
// /demo?{&page}{&sort*}{&filter*}

Features

  • RFC-6570 compliant URI template generation
  • Drop-in Symfony router/URL generator replacement
  • Supports query, list, and composite expressions
  • Auto-registered with Symfony Flex
  • Simple service-based API
Frequently asked questions about Templated Uri Bundle
What is ibexa/templated-uri-bundle used for?
It is a Symfony bundle that adds an RFC-6570 compatible router and URL generator. It exposes the hautelook.router.template service so you can generate templated links such as /demo?{&page}{&sort*}{&filter*} from route parameters. It is useful for APIs, HATEOAS links, filtering, pagination, and legacy URL migration.
Does ibexa/templated-uri-bundle work with Laravel?
No, it is a Symfony bundle and does not provide a Laravel service provider, facade, or router integration. Laravel applications do not register Symfony bundles the same way, so installing it with Composer will not make templated routing work out of the box. Laravel teams should evaluate the underlying hautelook/TemplatedUriRouter library or a Laravel-native RFC-6570 implementation instead.
How do I install ibexa/templated-uri-bundle?
Run composer require ibexa/templated-uri-bundle. In a Symfony app, register Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle in AppKernel.php or let Symfony Flex add it to bundles.php. Then use the hautelook.router.template service. Laravel has no equivalent bundle registration step.
Which Symfony versions does ibexa/templated-uri-bundle support?
The package context indicates support for Symfony 3 through 6, including Flex. Because it is a fork of hautelook/templated-uri-bundle, you should pin symfony/* dependencies and verify compatibility for your exact Symfony version before production use. The original package's support range may differ from the fork's.
How do I generate an RFC-6570 URI template with this bundle?
Get the hautelook.router.template service and call generate with a route name and parameters that contain template expressions. For example, passing page as {page}, sort as an array containing {sort}, and filter as an array containing {filter} can produce /demo?{&page}{&sort*}{&filter*}. Validate the resulting template because malformed braces or invalid expansion patterns can break clients.
What is the difference between ibexa/templated-uri-bundle and hautelook/templated-uri-bundle?
ibexa/templated-uri-bundle is a fork of hautelook/templated-uri-bundle. Both wrap the hautelook/TemplatedUriRouter library and expose a Symfony bundle for RFC-6570 templated routing. The fork may lag behind the original in maintenance or Symfony version support, so compare release history and pin dependencies carefully.
Can I use it alongside Symfony's default router?
Yes, the bundle is designed to extend rather than replace Symfony's native router. Existing routes can keep using Symfony's normal URL generation while templated routes use the hautelook.router.template service. This makes a hybrid routing strategy feasible when only some endpoints need RFC-6570 templates.
Is ibexa/templated-uri-bundle safe for production APIs?
It can be suitable for production APIs that need RFC-6570 template generation, but the evaluation notes a lack of tests and potential Symfony version drift. Validate templates at runtime, sanitize dynamic variables, and benchmark against Symfony's native router for high-traffic endpoints. Add your own test coverage before relying on it for critical APIs.
How do I test templated URI generation with this bundle?
The package itself is noted as having testing gaps, so you should add integration tests around the hautelook.router.template service. Cover valid templates, malformed braces, reserved characters, missing parameters, and injection-style values. Property-based or table-driven tests are useful for checking RFC-6570 expansion edge cases.
What are alternatives to ibexa/templated-uri-bundle for RFC-6570 URLs?
Symfony's built-in router handles static routes but does not natively support RFC-6570 expansions like {&query} or {+segment}. You can use the underlying hautelook/TemplatedUriRouter library directly, implement template expansion in application code, or choose a Laravel-native URI template library if you are not on Symfony. Evaluate maintenance, test coverage, and framework integration before choosing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings