babelqueue/php-sdk
Framework-agnostic core of BabelQueue for PHP: the canonical polyglot queue envelope codec, contracts, validation, transports, dead-letter and idempotency helpers that all framework adapters (Laravel, Symfony) build on. Install directly only for framework-less apps or new adapters.
What this package actually is. babelqueue/php-sdk is not a Laravel queue driver — it is the wire-format core: a codec for a frozen JSON envelope ({job, trace_id, data, meta, attempts}, schema_version: 1), plus a set of opt-in building blocks (validation, idempotency, dead-letter, redrive, outbox, GDPR field encryption, OTel spans). The Laravel-facing surface lives in babelqueue/laravel, which is the package a Laravel team should normally install. For a TPM, the evaluation question is therefore not "does this drop into config/queue.php" but "is the contract worth adopting, and is the adapter trustworthy enough to sit under it."
Architecture fit. Strong conceptually. The design decisions are the ones a TPM would otherwise have to force onto a team: one canonical envelope with a single PHP implementation (so Laravel and Symfony adapters cannot drift), a versioning policy that quarantines rather than drops unsupported schema_version, additive-only envelope evolution (dead-letter block, GDPR ciphertext-as-string), and out-of-band transport headers (traceparent, bq-replay-bypass) kept beside the frozen envelope rather than inside it. That is a disciplined contract, and the golden fixtures in tests/fixtures/ give us something concrete to test against. If the organisation's strategic goal is "PHP producers, Go/Python/Node consumers on the same queue," this is the right shape of component.
Integration feasibility. Mixed, because the core deliberately stops short of the seams we care about. Transport is a one-method interface, OutboxStore is four methods we must bind to our own DB, RedriveIO we must bind to our broker, Cipher we must bind to KMS/Vault. That is clean dependency hygiene (ext-json only; predis, php-amqplib, ext-openssl, ext-pdo all optional) but it is real glue work that lands on us, not on the package. The other gap: Laravel's queue payload is a JSON wrapper around a PHP-serialized command object, so you cannot point a stock Laravel worker at a BabelQueue envelope. You need the adapter, or a custom Job class that decodes the envelope and re-dispatches locally.
Technical risk.
2026-10-26 last-release date should be verified — if it is forward-dated or scheduled, treat the release cadence as unproven.RPUSH only. No blocking pop, no visibility timeout, no reliable-queue semantics. Treat it as a demonstration seam, not a production consumer loop; production Redis should lean on Laravel's existing connection + Horizon and use the codec on top.RedriveIO (not HeaderRedriveIO), bypass: true becomes a best-effort no-op with item->bypassed = false. A redrive that re-fires a charge or an email is a customer-visible incident. This must be a hard assertion in our code, not a documented caveat.Cipher key and x-gdpr-sensitive fields are unrecoverable — the envelope is still valid, just unreadable.schema_version is a feature, but it means contract changes route through the vendor's ADR process, on their timeline.Key questions for the vendor/package owner.
babelqueue/laravel released, maintained, and compatible with our Laravel and PHP versions? What are its composer constraints?schema_version 1?RPUSH is the only primitive?Stack fit. Good, provided we consume the Laravel adapter rather than the core directly. The core's dependency minimalism means low conflict risk with an existing Laravel/Horizon/Octane stack; the only new runtime surface is optional extensions we already have. The codec is pure data-in/data-out, so it composes with whatever queue backend we already run — SQS, Redis, RabbitMQ — without changing brokers.
Migration path. Do not rewrite existing serialize()-based jobs. Introduce BabelQueue at one polyglot edge first: a new topic where a PHP producer and a non-PHP consumer must agree. Keep legacy queues untouched and running. Where the produce side is revenue-critical, put the outbox in front of it rather than the direct publish path — that gives us exactly-once handoff into the broker and removes the dual-write window, with idempotency on meta.id absorbing at-least-once on the wire.
Compatibility considerations.
composer.json (not stated in the README).PdoStore::ddl() gives us a portable idempotency table — plan a migration for it and a retention/GC policy for the rows.PdoStore's unique-INSERT claim is dialect-free and safe; that is the lowest-friction persistent dedupe choice.open-telemetry/api is a suggest — decide deliberately whether traceparent crosses hops, because retrofitting span links later is harder than enabling them up front.Sequencing (recommended).
tests/fixtures/ in CI as a contract test, and prove one PHP→non-PHP hop end to end.babelqueue/laravel behaviour for inbound envelope → Laravel job dispatch, and for outbound ShouldQueue jobs → envelope.ClaimingDispatch + PdoStore on the new consumers only. Measure ClaimParkedException rate from day one.OutboxStore against our DB and a relay worker with its own lag SLO, for the critical produce paths.Redrive with a HeaderRedriveIO implementation; assert item->bypassed === true when bypass is requested, and fail the run otherwise.Maintenance. The code surface we own is small but non-trivial: an OutboxStore implementation, a RedriveIO/HeaderRedriveIO implementation, a Cipher binding, an idempotency table and its GC, and a relay worker. Budget roughly one engineer for the initial glue and a fraction thereafter. Upgrades should be pinned (exact versions) and gated on our fixture-based conformance tests passing — the fixtures, not the changelog, are our real compatibility gate.
Support. Vendor support is the weakest dimension: no commercial signal, minimal community, 0 dependents. Mitigations: vendor the fixtures into our repo, keep a fork-and-patch capability, and prefer the spec-level contract over package internals so that swapping to another SDK implementation (Go/Python/Node are first-class in this ecosystem) remains viable if PHP-side maintenance stalls.
Scaling. The core itself is stateless and horizontally trivial. Scaling pressure concentrates in three places we must instrument: (a) the outbox relay — backlog depth and drain latency are the real throughput ceiling for critical producers; (b) the idempotency store — PdoStore puts claim contention on the primary DB, so high-volume consumers should prefer RedisStore (SET NX PX) or a dedicated schema; (c) consumer concurrency, unchanged from whatever transport we already run.
Failure modes to instrument and alert on.
EnvelopeValidator::check() rejections, broken out by reason — unsupported_schema_version spiking means a producer shipped a contract change without coordination; quarantine, never drop.UnknownUrnStrategy outcomes (fail/delete/release/dead_letter) — pick dead_letter as the default and alert on volume.ClaimParkedException rate — a sustained rise means duplicate deliveries or a stuck consumer.markFailed accumulations.item->bypassed === false despite bypass: true (treat as a P1 — external effects may have re-fired).Cipher rotation — key-version tagging is our responsibility, so design it into the envelope's data layer on day one.Ramp-up. Documentation is genuinely above average for a package this young: the README is decision-oriented, cites ADRs by number, and explains why the envelope is frozen and where headers live. A mid-level Laravel engineer can be productive on the codec in a day. The learning curve is not the codec — it is the operational discipline the package assumes (idempotent handlers, quarantine-over-drop, transaction boundaries on the outbox, replay markers asserted not hoped for). That is a team-practices investment, and it should be framed that way in the adoption proposal rather than sold as a library swap.
TPM recommendation. Proceed to a bounded spike, not a commitment. The contract design is the strongest thing here and aligns with a polyglot-queue strategy; the ecosystem around it is the thing that could strand us. Gate broader adoption on: adapter compatibility confirmed, conformance tests green in our CI, a fork/patch fallback agreed, and one production polyglot edge running cleanly for a full release cycle.
How can I help you explore Laravel packages today?