lendable/symfony-messenger-polyfill
A lightweight polyfill that provides Symfony Messenger-compatible classes and interfaces, letting Laravel and PHP projects use Messenger-style message buses without requiring the full Symfony component. Useful for package authors who need interoperability while keeping dependencies minimal.
What the package actually is. Despite being filed under "Laravel/PHP," this is a Symfony package. It polyfills the Symfony Messenger 4.2 API surface (message bus, envelopes, middleware, transports) onto Symfony 3.4/4.0/4.1 so teams could adopt Messenger contracts before upgrading. It presumes Symfony's DI container, console, and event dispatcher. There is no Laravel integration, no service provider, no queue driver, no Horizon hooks.
Architecture fit. Near zero for a Laravel codebase. Laravel already owns this problem space via Illuminate\Bus, Illuminate\Contracts\Queue, queued jobs, batching, and Horizon. Adopting this package means standing up Symfony Messenger alongside Laravel's dispatcher — dual bus abstractions, two retry policies, two failure paths, and no shared observability. For an all-Symfony shop on 3.4/4.0/4.1, fit is conditional but narrow: the polyfill shims the API, not the runtime, so it cannot deliver the bugfixes, transport hardening, or security patches that landed in later 4.2/4.3+.
Integration feasibility. Composer-installable, MIT, PSR-4 — mechanically trivial. Feasibility is dictated by the dependency graph: constraints are frozen at the 2019 PHP/Symfony era. On PHP 8.1+ or any current Symfony LTS, expect hard Composer conflicts. Because the repo is archived, there is no upstream path to widen constraints — only a fork.
Technical risk — high. Archived since early 2019; no security response, no Symfony 5/6/7 support, no PHP 8 support. 4 stars and 0 dependents means no production validation and no one to ask about real failure modes. The API it polyfills has itself evolved materially (envelope stamps, retry strategy, Doctrine transport, failed-message handling), so the shimmed contracts may diverge from what current documentation and engineers expect. Overall score 0.17 reflects a package that is a historical artifact, not a candidate.
Key questions.
Illuminate\Bus + Horizon not do that Messenger would?Stack fit. Poor. A forced integration would run Messenger as a parallel pipeline: register Symfony's MessageBus in the Laravel container, wire a transport (AMQP/Redis/Doctrine via Enqueue or a bespoke bridge), and run a supervisor-managed Artisan command as the consumer. Every dispatch point then needs a deliberate choice of bus. This is a permanent tax for a temporary compatibility win.
Migration path. The correct migration is away from the polyfill, not onto it.
Illuminate\Bus queued jobs, job batching, failed_jobs, and Horizon for supervision. This is the lowest-risk destination and requires no new dependency.Compatibility. Expect dependency conflicts on modern PHP. No stated compatibility with Laravel 10/11 or Symfony 5+. Envelope serialization format is not guaranteed to match current Messenger, so cross-version message replay (consumer upgraded before producer, or vice versa) is a latent breakage.
Sequencing. Timebox a 1–2 day spike to attempt install against the actual target PHP/Symfony matrix. If it fails — likely — close the option and reallocate to the upgrade plan. Do not sequence this ahead of an upgrade; it is a stopgap, and a stale one. If it proceeds at all, it must ship behind a decision record naming the exit condition.
Maintenance. Upstream maintenance is zero. We become the maintainer by default. Budget for a fork, a CI matrix across the supported PHP/Symfony combinations, and a named owner — or accept it explicitly as tracked technical debt.
Support. No issue activity, no CVE feed, no vendor, no community. Internal expertise must cover both Symfony Messenger internals and the polyfill's shims. Abandoned-package scanners will flag it, which means recurring audit conversations.
Scaling. The package contributes nothing to scaling — throughput is entirely a function of the transport we wire (AMQP, Redis, Doctrine). It ships no worker supervision, no autoscaling, no backpressure story. On Laravel we would still need Horizon or Supervisor/systemd for worker lifecycle.
Failure modes. Silent divergence between polyfilled contracts and real Messenger behavior; serialization drift across versions; immature 4.2-era retry and failed-transport semantics; Composer lock churn on any PHP bump; double-dispatch bugs where a message traverses both Laravel's bus and Messenger; and a hard stop at the next framework upgrade with no upstream fix available.
Ramp-up. Cheap to read, expensive to trust. Engineers must learn Symfony Messenger as it existed in 4.2 plus the gaps — a narrow, stale skill set that does not transfer to current Messenger or to Laravel's bus. Onboarding docs will need to explain why a 2019 archived polyfill exists in the repository at all.
Recommendation: reject for adoption; adopt the native alternative (Illuminate\Bus/Horizon on Laravel, native Messenger on a supported Symfony LTS). Retain only as a documented reference if an existing system already depends on it.
How can I help you explore Laravel packages today?