rhapsody-project/backbone-js-bundle
Rhapsody Project's Symfony bundle for integrating Backbone.js into PHP applications. It packages the Backbone front-end library for easier asset management and configuration, helping teams add structured JavaScript MVC to Symfony projects with less manual setup.
What the 1.2 release actually changes: The release note — "Backbone.js (ver. 1.2) with Underscore.js (ver. 1.6)" — describes a bundled front-end asset bump, not a change to PHP-side behavior. The package under review is therefore best understood as a Laravel asset-bundling/scaffolding package that ships Backbone.js and Underscore.js as vendorable JS, with thin PHP glue (service provider, publishable config/asset paths, possibly generators or Blade directives). This distinction drives the entire assessment: the TPM's real dependency is a 2015-era JavaScript MVC stack, not Laravel code.
Architecture fit: Low-to-moderate. Modern Laravel applications have largely standardized on Inertia/Vue/React, Livewire, or Alpine, with Vite as the asset pipeline. A package that pins Backbone 1.2 + Underscore 1.6 sits orthogonal to that. Fit is credible only for (a) maintaining an existing legacy Laravel app already using Backbone views, or (b) a deliberately server-rendered, thin-client app where a full SPA framework is unwanted overhead.
Integration feasibility: Mechanically easy — Composer install plus vendor:publish for assets, then reference them from a layout. The friction is not installation but the surrounding graph: Backbone 1.2 requires jQuery (1.11+/2.1+) or Zepto, and the bundled Underscore 1.6 predates later security hardening. In a Vite-based app the assets will need to be copied out of vendor/ and treated as first-class source, at which point the package's value is mostly "a known-good pinned pair" rather than ongoing functionality.
Technical risk:
_.template code-injection issue (CVE-2021-23358). Shipping 1.6 will trip SCA scanners and is difficult to defend in a security review, even where the vulnerable function is unused.Key questions for the maintainer/owner:
vendor/ at runtime, or copied into the app's build? (Determines whether we can patch in place.)Stack fit: Assume a Laravel 10/11 host with Vite, Composer, and an existing auth/UI stack. The package contributes static JS only; it does not interact with Eloquent, queues, or the container in any meaningful way. That makes it safe to adopt in isolation and equally safe to remove later — a favorable characteristic for a candidate we may want to sunset.
Migration path:
Backbone., _. and Backbone.$ usage, and count views/models/routers. This is the true cost driver, not the install.resources/js/vendor/ rather than referencing vendor/ directly, so we own the files and can patch or replace Underscore independently of the Composer package._.template call sites.Compatibility considerations: Confirm PHP/Laravel version constraints in composer.json against our supported matrix, and confirm the asset publishing tags don't collide with existing published config. Check whether the service provider auto-registers routes or Blade directives that would need to be disabled.
Sequencing: (a) Security exception and Underscore patch decision → (b) install and publish in a non-production branch → (c) verify no asset or provider collision → (d) ship to a low-traffic surface → (e) only then broaden adoption or begin the sunset plan. Do not sequence this ahead of an SCA policy decision, or the pipeline will block the release.
Maintenance: The heavy tail. We inherit stewardship of an unmaintained 2015 JS stack. Budget a recurring line item for: monitoring advisories against bundled JS, re-applying the Underscore patch on each package bump (which may silently revert it), and the eventual migration. The PHP side is near-zero maintenance.
Support: Vendor support is effectively community-only and low-velocity. Define an internal owner (likely the front-end guild, not platform) and document the pinned-version rationale in an ADR so future maintainers don't "helpfully" bump the pin without re-testing Backbone views.
Scaling: Backbone scales acceptably for view-heavy, request/response UIs with modest client state. It does not scale to complex shared client state, real-time collaboration, or large teams — the absence of a component model and typed data flow becomes an onboarding tax. Since the package is asset-only, client-side scaling concerns are a property of the consuming app, not the package; the package imposes no server-side scaling cost.
Failure modes:
Ramp-up: Low for anyone who has used Backbone; effectively zero for the PHP integration. For engineers hired after ~2019, expect 2–5 days to become productive in Backbone idioms (views, events, Backbone.$.ajax wiring, model/collection sync) and longer to internalize the conventions of the existing codebase. Recommend pairing and a short internal note on the legacy patterns in use.
TPM recommendation: Approve narrowly for maintaining existing Backbone surfaces, with two conditions — publish assets into our own source tree and upgrade Underscore off the 1.6 pin before first production use. Reject for greenfield work; the same effort is better spent on Livewire or an Inertia/Vue setup. Set an explicit sunset checkpoint (e.g., review at the next two planning cycles) rather than letting an unmaintained dependency sit indefinitely.
How can I help you explore Laravel packages today?