funddy/jsrouting-bundle
Funddy JSRoutingBundle exposes Symfony routes to JavaScript, letting front-end code generate URLs from route names and parameters without hardcoding paths. It integrates with Symfony routing and provides a lightweight JS helper for client-side links, AJAX calls, and navigation.
The underlying capability is worth having, even though this package isn't. funddy/jsrouting-bundle solves one narrow but recurring problem: your PHP routes are the single source of truth for URLs, but the JavaScript layer has to hardcode or re-derive them. Every time a route changes, someone greps for string literals, and occasionally someone misses one and you ship a 404. Exposing the route table to the browser as a JSON map (name → path, plus required parameters) removes that entire class of defect.
Concretely, that capability informs these decisions:
/api/v1, introducing localized route prefixes, splitting a monolith's routes), the cost of that work is largely determined by how many hardcoded URLs exist client-side. A route-exposure layer makes the refactor a backend-only change. That should influence when you schedule the refactor, not just whether.FOSJsRoutingBundle, which is the direct descendant of this package's idea.fetch calls with route parameters, sharing link-building logic between server-rendered and client-rendered views, and avoiding duplicated route constants across two languages.Framework mismatch is a blocking fact, not a footnote. The prompt frames this as a Laravel/PHP package; it is a Symfony2 bundle (Symfony2 in the description, Bundle suffix, funddy namespace). Symfony2 reached end-of-life in 2018. If your product is on Laravel — or on Symfony 5/6/7 — this package is not installable in any meaningful sense without a port. That alone converts the decision from "evaluate" to "do not adopt."
Consider it only in these narrow situations:
Look elsewhere — decisively — if any of the following are true:
tighten/ziggy. It's maintained, handles route parameters and middleware-scoped route filtering, ships a @routes Blade directive and npm package, and is tested against current framework versions. This is not a close call.friendsofsymfony/fosjsrouting-bundle. It is the maintained successor to this exact idea.For executives — one paragraph:
There's a real, recurring engineering cost in keeping frontend and backend URLs in sync, and it shows up as broken links and 404s after every routing change. This specific package addresses that problem, but it targets Symfony 2, a framework version that has been end-of-life since 2018, and it has effectively no adoption (single-digit stars, no dependent projects, no maintainer activity). Recommendation: do not adopt. The capability is worth having; this artifact is not the way to get it. For a Laravel codebase, adopting the maintained equivalent (Ziggy) is roughly a half-day of integration work and eliminates the URL-drift defect class permanently. If we'd rather not add a dependency, a small in-house route-manifest endpoint is a 1–3 day build with no ongoing maintenance surface. Either path is cheaper than the status quo over a year.
For engineering — the short version:
The pattern is sound: serialize the named route collection to JSON, filter by middleware/role, expose it via a Blade directive or a build-time artifact, and let the frontend call route('users.show', {id}). The package in question is a Symfony2-era implementation with no dependents and no maintenance, so it's a design reference only. In Laravel, Ziggy implements exactly this pattern and covers the edge cases we'd otherwise rediscover — parameter encoding, optional segments, grouped/prefix middleware filtering, and TypeScript definitions. Two caveats to plan for regardless of implementation: filter the manifest by role so we don't ship admin route names to unauthenticated clients, and version the manifest with the app so a stale cached bundle doesn't generate URLs for routes that no longer exist. If we build in-house, budget the extra day for those two concerns — that's where the actual risk lives, not in the serialization.
How can I help you explore Laravel packages today?