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

Back Url Bundle Laravel Package

ys-tools/back-url-bundle

A Symfony bundle from ys-tools that helps applications track and restore the user's previous URL, so back links and post-action redirects return visitors to the right page. Configures through Symfony services and integrates with routing and session handling.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor, and mis-scoped. Despite the package description, this is not a Laravel package: it is a Symfony 2 bundle (ys-tools/back-url-bundle) providing a @BackUrl controller annotation that captures a return URL and redirects the user back after an action. It plugs into the Symfony 2 kernel (bundle class, DI container XML, doctrine/annotations reader, request/controller event listeners). Laravel exposes none of those extension points. The behavior it implements, however, maps almost 1:1 onto native Laravel primitives: redirect()->intended(), url()->previous(), session flash keys, and route middleware.

Integration feasibility — low as a dependency, trivial as a reimplementation. There is no Composer auto-discovery, no service provider, no Illuminate contracts, no PSR-15 middleware. Adopting it would mean writing a compatibility shim to translate Symfony 2 bundle bootstrapping into a Laravel service provider — strictly more work than writing the ~50 lines of middleware that produce the same outcome. Estimated effort to replicate the behavior natively: under one day including tests.

Technical risk — high / disqualifying.

  • Archived, 0 stars, 0 dependents — no maintainer, no issue triage, no security response path.
  • Symfony 2 is end-of-life (2.8 reached EOL in 2018); the code targets the PHP 5.6/7.0 era and will not run cleanly on current PHP runtimes.
  • Composer constraints will conflict with any modern Laravel application (symfony/* 2.x and doctrine/annotations 1.x pins).
  • Unpatched code handling a user-influenced redirect target is a textbook open-redirect exposure; there is no evidence of validation in the package.

Key questions for the requesting team:

  1. What requirement is this satisfying that Laravel's built-in intended() / previous() does not already cover?
  2. Is the return URL ever sourced from an untrusted input (query param, Referer)? If so, who owns the allow-list?
  3. Does any existing code or documentation depend on the annotation opt-in semantics specifically, or only on the resulting redirect behavior?
  4. Is this a one-off internal tool, or something we expect to expose to end users?

Verdict: reject as a dependency; treat it as a design reference only.

Integration Approach

Stack fit — none. No Laravel support, no Symfony 5/6/7 support, no PSR-15 or PSR-11 interoperability. It cannot be installed into a Laravel application without forking and rewriting it.

Migration path — migrate the behavior, not the package. Replace the annotation with a Laravel-native pattern:

  • A small route/controller middleware that stores the incoming URL in the session under an intended-style key when the request is a GET and the route opts in (attribute or route-metadata flag).
  • Redirect via redirect()->intended($fallback) after the action completes.
  • An explicit allow-list or same-host validation before any redirect is honored.

If a per-action opt-in is genuinely required, PHP 8 attributes on the controller method are the modern equivalent of the Symfony 2 annotation and need no extra library.

Compatibility. Assume total incompatibility: Symfony 2 components, doctrine/annotations 1.x, and pre-PHP-7.4 syntax. Do not attempt installation in any environment, including ephemeral CI. There is no supported upgrade path because the upstream is archived.

Sequencing.

  1. Confirm the business requirement and the concrete user flow it serves (form → submit → return to originating list/detail view).
  2. Implement the middleware + session key in the application; add the open-redirect guard at the same time, not later.
  3. Write feature tests for the three risky cases: same-URL loop, external-host target, expired/missing session value.
  4. Update documentation and remove any references to this package from the design record.
  5. If a package is preferred over in-app code, evaluate a maintained Laravel equivalent rather than porting this one.

Operational Impact

Maintenance. Effectively infinite relative to value. Because upstream is archived, adopting it transfers full ownership of both the package and the Symfony 2 compatibility shim to our team — a permanent liability for functionality that is otherwise a handful of lines. Zero upstream commits means zero upstream fixes, forever.

Support. No maintainer, no release cadence, no issue tracker activity, no documentation beyond a README. Any incident traces directly to us with no escalation path.

Scaling. Not a concern either way. The behavior is a session read plus a redirect; cost is negligible and does not vary with load. The redirect adds one round trip, which is inherent to the pattern, not to this package.

Failure modes to design against (in the reimplementation):

  • Infinite redirect loop when the stored "back" URL equals the current request URL.
  • Open redirect / phishing via a crafted return URL or spoofed Referer — enforce same-host or an allow-list; never trust the header blindly.
  • Cross-tab contamination — a single session key means concurrent tabs overwrite each other's return target; use named keys per flow if multiple flows exist.
  • Lost return URL on session expiry, causing a silent fallback drop; always supply a deterministic fallback route.
  • Stale targets after auth state changes, producing redirects to 403 pages.

Ramp-up. For the native middleware: near-zero; any Laravel developer can own it immediately. For a ported Symfony 2 bundle: requires Symfony 2 and Doctrine annotation familiarity, plus ongoing attention to PHP runtime upgrades — an unjustifiable skills tax for this scope.

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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect