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
Router Bundle

Router Bundle Laravel Package

ongr/router-bundle

Symfony bundle that adds Elasticsearch-backed routing: store route definitions as documents, match incoming URLs through a custom router, and generate paths from indexed content. Useful for dynamic CMS pages and large route sets managed outside static Symfony routing.

View on GitHub
Deep Wiki
Context7

ONGR RouterBundle integrates the ONGR Router library into Symfony, letting you match incoming URLs against routes stored in Elasticsearch instead of static configuration. Routes are indexed as documents and resolved at request time, making large, dynamic route sets fast to query and easy to update without redeploying.

  • Elasticsearch-backed route matching and lookup
  • Symfony service and configuration integration
  • Route storage as indexable documents with customizable mapping
  • Supports dynamic, large-scale route definitions
  • Pluggable route providers and match handlers
Frequently asked questions about Router Bundle
Is ongr/router-bundle compatible with Laravel?
No. ongr/router-bundle is a Symfony bundle for ONGR routing, not a Laravel package, and Laravel does not consume Symfony bundles through its package discovery or service provider model. Native integration is not available, so you would need a custom adapter or a separate Symfony runtime. For a Laravel-first stack, this introduces architectural complexity that is disproportionate to the package's maturity.
What does ONGR Router Bundle actually do?
It provides an Elasticsearch-backed router for Symfony applications. Route definitions are stored as Elasticsearch documents, and incoming URLs are resolved dynamically from those documents. This enables flexible, content-driven routing without hardcoding every route in Symfony configuration.
Can I install ongr/router-bundle with Composer in a Laravel application?
Composer may install the code, but that does not make it a usable Laravel dependency. There is no Laravel service provider, configuration publishing, route registration, or middleware integration. Treat it as a legacy Symfony component rather than a reusable Laravel package.
Which PHP and Symfony versions does ongr/router-bundle support?
The bundle targets Symfony and its last release was in 2017, so modern PHP and Symfony compatibility should be treated as unproven. You must validate the supported PHP version, Symfony version, autoloading, dependency injection assumptions, and framework bootstrap requirements. Expect compatibility gaps to surface late unless you prove them with an isolated spike.
Is ongr/router-bundle still maintained?
It appears unmaintained. The last release was 2017-05-04, the repository has roughly 6 stars and 0 dependents, and there is no active community support signal. If you adopt it, budget for a fork or internal maintenance plan covering patches, dependency updates, and security fixes rather than relying on upstream responsiveness.
What are the alternatives to ongr/router-bundle for dynamic routing in Laravel?
Start with Laravel's native router, route caching, middleware, route model binding, and a small custom route registrar or internal abstraction. Most content-driven routing needs can be reproduced without pulling in a Symfony bundle. Compare the exact ONGR routing semantics you need against Laravel-native capabilities before considering any external dependency.
How would I integrate ongr/router-bundle if I absolutely must use it?
Contain it behind an anti-corruption layer or isolate it as a separate Symfony service accessed over HTTP or a queue boundary. Do not spread bundle dependencies through the Laravel codebase, and feature-flag the integration. Run a short proof of concept in an isolated Symfony context first, not inside the Laravel application.
Does ongr/router-bundle work with Laravel route caching and middleware?
No. It uses Symfony's routing pipeline, so Laravel route caching, middleware, and route registration do not map cleanly to it. Custom bridging would be required to connect its URL resolution behavior to Laravel's request lifecycle. That bridge adds maintenance cost and should be proven before production use.
What are the production risks of using ongr/router-bundle?
The main risks are abandonment, outdated PHP and Symfony compatibility, abandoned transitive dependencies, missing security patches, limited documentation, and poor community support. The bundle is unlikely to be the primary scaling constraint, but legacy framework coupling can limit deployment flexibility and runtime upgrades. Treat maintenance as a high internal burden, not an upstream responsibility.
How should I test or migrate away from ongr/router-bundle?
Begin with capability discovery: document the exact routing rules, URL generation, matching semantics, and ONGR-specific behavior the business needs. Compare those needs against Laravel's router and common Laravel-native packages. If migration is required, move route-by-route with regression tests and URL compatibility checks, and plan decommissioning before production dependency grows.
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.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle