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

Redirect Bundle Laravel Package

enhavo/redirect-bundle

Enhavo Redirect Bundle is a subtree split of the Enhavo CMS, an open-source PHP project built on the full-stack Symfony framework for flexible, complex data structures. See the main repository for full documentation and details.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Flag up front: this is not a Laravel package. enhavo/redirect-bundle is a Symfony bundle extracted as a subtree split from the Enhavo CMS monorepo. It wires into Symfony's DI container, Doctrine ORM, and Enhavo's own bundle stack (resource/metadata/routing abstractions). There is no Illuminate service provider, no Eloquent model, and no Laravel-compatible middleware. For a Laravel codebase the realistic use is as a reference implementation, not a dependency.

Integration feasibility. Direct composer require in Laravel: no. It requires Symfony framework-bundle, Doctrine, and Enhavo core packages; resolution will pull the CMS. Porting effort is moderate but bounded — the domain surface is small: a redirect entity (source, target, code, enabled, optional domain/locale scope) plus a request listener that resolves an inbound path to a target.

Technical risk.

  • Score 0, 0 stars, 0 dependents, maturity "readme": essentially no adoption signal.
  • It is a read-only subtree split — issues and PRs live in the main repo, so triage and change velocity sit outside your control.
  • Version tags may not be mirrored; you may be pinning to a monorepo commit hash.
  • Documentation is a logo and a pointer to the main repo. No behavior contract, no matching-semantics spec.
  • Redirect logic is deceptively subtle (loops, chains, query strings, trailing slashes, locale/domain scoping, cache invalidation). An undocumented reference carries real behavioral risk.

Key questions. Which Enhavo/Symfony/PHP versions are supported? Are releases mirrored or only branch aliases? What is the matching semantics — exact path, prefix, wildcard, regex — and what is precedence? Is lookup domain/locale scoped? Where is it cached and how is invalidation triggered on edit? Is chain-following or cycle detection implemented? Are query strings and fragments preserved? Is 410 Gone, hit-counting, or analytics supported? Is there an import path from a legacy redirect table or CSV?

Integration Approach

Stack fit. Poor as a drop-in; reasonable as a spec. The Laravel-native equivalent is a redirects table + Eloquent model, a global middleware (or Route::fallback) doing path lookup, a cached full-map in Redis/array cache, and a Filament/Nova CRUD for editors.

Migration path. Two options:

  1. Port (recommended). Extract the matching rules from the bundle's listener and reimplement in Laravel middleware with an Eloquent model. Days, not weeks.
  2. Adopt Symfony/Enhavo for the redirect path only. Not viable — the bundle assumes it owns the kernel request lifecycle and the admin stack.

Compatibility. Confirm PHP version parity first; that's usually the only hard blocker in a port. Doctrine annotations/attributes do not translate to Eloquent — plan a fresh schema. Enhavo's resource/metadata layer has no Laravel analog, so the admin UI must be rebuilt regardless.

Sequencing.

  1. Define schema and matching semantics explicitly (exact/prefix/regex, precedence order).
  2. Implement middleware + resolution with cycle detection and a hard hop limit.
  3. Add caching with deterministic invalidation on write; warm the map on deploy.
  4. Build admin CRUD and a CSV / legacy-table importer.
  5. Add observability: hit counts, 404 logging, unmatched-path reporting.
  6. Backfill existing redirects, run shadow-mode comparison, then cut over.

Operational Impact

Maintenance. You own it. The subtree split means no issues, no release feed you can subscribe to, and diffs that arrive bundled with the monorepo. Budget a periodic read of the main repo to catch behavior changes.

Support. Low external adoption for this split; expect to be self-sufficient. The only real mitigant is MIT licensing — vendoring or forking is permitted, so you are not locked out of a fix.

Scaling. Resolution sits on the hot path of every request. A naive per-request SELECT against a large table will dominate latency. Requirements: indexed source column, a full in-memory/Redis map for small-to-medium sets (~10k–100k rows), and cache warm on deploy. Watch for N+1 when following chains.

Failure modes.

  • Redirect loops and long chains → enforce a hop limit and reject cycles at write time.
  • Stale cache after an editor saves → invalidation must be transactional, not TTL-only.
  • Case / trailing-slash / percent-encoding mismatches → normalize on both write and lookup.
  • Dangling targets producing 301s to 404s → validate targets on save plus a scheduled sweep.
  • Wildcard or regex rules shadowing explicit ones → deterministic precedence is a product decision; document it.
  • Query-string and fragment loss → decide policy per rule, not globally.
  • Locale/domain collisions in multi-site setups → require an explicit site key on every rule.

Ramp-up. Low for the concept, moderate-to-wasteful for the source: Enhavo's abstractions (resource bundles, metadata-driven admin) are unfamiliar to most Laravel engineers and cost more to read than the underlying logic is worth. Expect roughly a day of orientation ending in "port it," then proceed with the Laravel-native design.

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.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log