symfony/routing
The Symfony Routing component maps an HTTP request to a set of configuration variables. It matches incoming URLs to routes and generates URLs from route names, supporting parameters, requirements, defaults, HTTP methods, and localized paths. Install it in any PHP project via Composer.
RouteServiceProvider), allowing reuse in microservices, APIs, or non-Laravel PHP projects.RequestContext and environment-specific route configurations."0" URL). This is evidence we can point to when defending "buy + stay patched" over custom routing code — but it also makes patch currency a roadmap obligation, not an afterthought.Adopt if:
#[Route] annotations).fast-route.Look elsewhere if:
Route facade may suffice.fast-route is faster but less feature-rich).RouteCollection, UrlGenerator, and RequestContext.For Executives: *"Symfony’s Routing Component is the gold standard for URL management in PHP, used by Laravel under the hood for complex applications. By adopting this package, we can:
#[Route] attributes) and reusable URL generation.For Engineers: *"This package gives us:
#[Route('/blog/{slug}')]) to replace YAML/XML files, reducing boilerplate.UrlGenerator.Action from v5.4.54 (security + "0" URL matching fix):
symfony/routing to ≥ 5.4.54 and verify the lockfile in every app and service that vendors it (including transitive installs via Laravel). Treat this as a routine patch, not a feature upgrade — no API changes expected."0", add a regression test; that matching bug is exactly the class of edge case that only shows up in production.Tradeoff: Slightly heavier than fast-route, but worth it for maintainability and features. Let’s prototype it for our API routes first — and wire the dependency into our automated security-patch pipeline from day one."*
How can I help you explore Laravel packages today?