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

Sfcontextbundle Laravel Package

francisbesset/sfcontextbundle

Symfony bundle providing a centralized context service inspired by Symfony 1's sfContext, offering convenient access to the current request, response, user, and other shared application services. It simplifies managing context dependencies with straightforward configuration.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Legacy migration sequencing, not new feature work. This bundle exists to answer one narrow question: can we run Symfony 1.x-era code that depends on sfContext alongside a Symfony 2 application while we port incrementally? It does not inform roadmap, feature prioritization, or customer-facing capability. Any PM time spent on it is migration-risk management, not product strategy.
  • Build vs. buy vs. vendor. The package is a thin compatibility shim (13 stars, 0 dependents, low health score). The decision it actually supports is "do we adopt a third-party bridge, vendor a fork we own, or refactor the sfContext call sites instead?" Given the adoption signals, the defensible answer is almost always: refactor, or fork-and-own. Do not take a hard dependency on an unmaintained shim for a multi-quarter migration.
  • Tech-debt triage and exit planning. Treat sfContext as a named seam in the architecture. The PM decision is to give it a decommission date and a blast-radius budget (how many call sites are allowed to touch it), so the shim doesn't quietly become permanent infrastructure.
  • Use cases where it's genuinely relevant: strangler-fig ports of Symfony 1.x applications; legacy plugins or in-house code that reach for sfContext::getInstance() for routing, request, user/session, or configuration; teams that must keep two stacks live behind one entry point during a transition.
  • Explicit non-decision: it is not a reason to delay or accelerate modernization. If the migration isn't already funded and underway, adopting this package solves a problem you don't have yet.

Note: the repository is a Symfony 2 bundle, not a Laravel package — the dependency/ecosystem framing should be corrected before it reaches any backlog or procurement ticket.

When to Consider This Package

Adopt only when all of the following hold:

  • You have a live Symfony 1.x codebase with meaningful sfContext usage (routing, getRequest(), getUser(), getConfiguration()) that you cannot refactor in one pass.
  • You are executing an incremental, dual-stack migration where Symfony 1 and Symfony 2 code must coexist, and you need a compatibility seam to keep the older layer functional during the transition.
  • You have an engineering owner willing to vendor or fork the bundle, pin it, and patch it — because the upstream health signals (13 stars, 0 dependents, low score, no dependent ecosystem) do not support assuming ongoing maintenance.
  • You have verified compatibility against your exact PHP and Symfony minor versions, and you've audited the code for security and session/user handling before it touches auth paths.

Look elsewhere — or stop — when:

  • The target is Symfony 3+ or Laravel; modern Symfony favors explicit DI and autowiring, and sfContext is a global service locator that fights that model. Laravel has no analogous concept and no reason to bridge to one.
  • The migration has no funded end date. A shim without an exit plan is just new legacy.
  • The sfContext surface is small enough to refactor directly — a handful of call sites is cheaper to rewrite than to bridge, and you avoid introducing global state into a clean codebase.
  • You need vendor support, SLAs, or security guarantees. There is no commercial backing here.
  • You are starting greenfield. This package should never appear in a new project's dependency graph.

How to Pitch It (Stakeholders)

For executives: This is a low-cost, low-risk transitional utility, not a platform investment. It costs almost nothing to evaluate and nothing to reject. Its only legitimate role is to unblock an in-flight Symfony 1 → 2 migration by letting legacy code keep working while it's ported. It is unmaintained and effectively unused in the wild, so we should not build strategy on it. Recommendation: treat it as a temporary bridge with a hard removal date, or skip it entirely and refactor the call sites — either way, it does not belong on the roadmap.

For engineering: sfContext is a global service-locator anti-pattern. If we adopt this, we are deliberately re-introducing global state into a DI-based codebase. Confine it behind a single adapter, forbid new call sites, log every usage, and schedule deletion. Assume no upstream support: vendor it, pin the version, and review it before it touches request/user/session code. If the number of call sites is small, rewriting them is the better engineering trade.

Ask: fund the migration, not the bundle. Approve a short spike (1–2 days) to count sfContext call sites and confirm version compatibility; the spike output decides build-vs-buy-vs-refactor, and default expectation is refactor.

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