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.
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.
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?
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:
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.
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.
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.
How can I help you explore Laravel packages today?