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 Laravel Package

hoa/router

Hoa\Router is a standalone PHP routing component for mapping HTTP and CLI requests to handlers. It offers route patterns, variable constraints, HTTP method matching, and flexible callbacks, making it easy to build clean, maintainable routing layers for custom PHP applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor. Hoa\Router is a standalone, framework-agnostic route matcher. Laravel's router is a dispatch contract: Illuminate\Routing\Router owns route registration, the middleware pipeline, controller resolution, route model binding, named-route URL generation, signed URLs, and route caching. Hoa returns a matched rule and extracted variables — nothing else. Adopting it means either running two routers or rebuilding the dispatch layer around it. That is an impedance mismatch at the architecture level, not an API-shape problem.

Integration feasibility — technically possible, practically unattractive. There is no Laravel service provider, facade, config, or published integration pattern, and zero dependents on Packagist means no reference implementations to copy. Composer installation is likely fine, but the package is archived (last release 2017-01-14) and pulls abandoned Hoa transitive dependencies. A credible proof of concept — adapter, parity harness, dispatch shim — is multi-week work for a senior Laravel engineer.

Technical risk — high.

  • No upstream security patching or PHP-version support guarantees; PHP 8.x compatibility is unverified and likely to require a fork (dynamic properties, removed curly-brace offsets, each(), and other deprecations).
  • Rule semantics (regex/grammar-based, method prefixes, variable capture) differ subtly from Laravel's: trailing slashes, 404-vs-405 handling, optional segments, and host/subdomain rules will not map 1:1. Silent behavioral drift is the default outcome.
  • Capabilities Laravel developers assume — route(), signed URLs, route:cache, model binding, middleware — are lost or must be reimplemented.
  • License is permissive (BSD-3-Clause), so forking is legally viable. That is also the trap: adoption converts you into the maintainer.

Key questions.

  1. What concrete requirement can Laravel's native router not satisfy? If none, stop here.
  2. Is there a legacy route DSL to preserve, and can it be translated at build time or at the edge instead of at runtime?
  3. What is the target PHP version, and does hoa/router's test suite pass on it today?
  4. Who owns the fork, the patches, and the on-call rotation if this lands in production?
  5. Is there a maintained alternative (Symfony Routing, FastRoute, Laravel native) that covers the same gap with a support story?

The package signals are consistent with this read: 28 stars, 0 dependents, archived, overall score ~1.05, and only a modest 16.82 opportunity score.

Integration Approach

Stack fit — poor for a standard Laravel app. Hoa would sit outside the HTTP kernel, so you either bypass Laravel's router for selected paths or maintain parallel routing tables. It is a defensible fit only for non-Laravel CLI/HTTP microservices or a tightly scoped legacy bridge.

Migration path. If pursued, isolate behind an internal RouteMatcher contract with two implementations: Laravel native (default) and Hoa (opt-in per path prefix). Run Hoa in shadow mode against production traffic, comparing match results with Laravel's router, and gate any cutover on parity metrics. Hoa must never own URL generation, middleware, or controller dispatch.

Compatibility. Verify Composer resolution on the target PHP (8.1+), audit transitive Hoa dependencies for abandonment, run the upstream tests, and produce a rule-syntax compatibility matrix versus Laravel. Budget for a vendored, patched fork rather than a clean dependency.

Sequencing.

  1. Requirements validation — prove the gap exists.
  2. Time-boxed spike with adapter plus parity harness (2–4 weeks).
  3. Fork, pin, and vendor the patched version if the spike succeeds.
  4. Shadow-mode rollout on one low-risk route group.
  5. Cutover only if parity holds; define rollback and exit criteria before step 2.

For most teams this sequence terminates at step 1, and that is the correct outcome. If the underlying need is framework-agnostic matching, Symfony Routing or FastRoute is the maintained path; if it is legacy DSL preservation, translate routes at build time.

Operational Impact

Maintenance. Upstream is effectively unmaintained. Adoption means owning a fork indefinitely: PHP upgrades, dependency updates, test-suite modernization, and security patches. This is a recurring, unbudgeted cost with no vendor to escalate to.

Support. No active maintainers, no vendor, negligible community (28 stars, 0 dependents). Incident resolution is entirely internal, and knowledge will concentrate in one or two engineers — a real bus-factor risk.

Scaling. Matcher throughput is not the concern; regex-based matching is adequate at typical route counts. The scaling risk is operational: every new routing feature (constraints, domains, localization, caching) becomes bespoke engineering, and the route-cache story is unclear, which can hurt cold-start and deploy times at scale.

Failure modes.

  • Silent behavioral drift versus Laravel (404 vs. 405, trailing slashes, URL decoding, optional params).
  • Duplicate or skipped middleware from running two dispatch paths.
  • Broken route() and signed-URL generation where Hoa owns matching.
  • Unpatched vulnerability with no upstream fix path.
  • Composer resolution failures blocking CI on the next PHP upgrade.
  • Test-suite rot preventing meaningful regression coverage.

Ramp-up. The public API is small, so surface-level ramp-up is days. The hidden work — dispatch, middleware bridging, URL generation, parity testing — is where the cost lives. Estimate 2–4 weeks to a credible spike and materially more to production parity, versus near-zero for staying on Laravel's router.

Recommendation. Do not adopt hoa/router in a Laravel application. The archived status, absence of dependents, and architectural mismatch outweigh any narrow matching benefit. If a specific legacy routing requirement exists, translate it at build time or wrap a maintained alternative; keep Hoa out of the critical path.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core