mirafive/sdk-symfony
Mirafive SDK for Symfony offers a framework-friendly integration layer for the Mirafive PHP SDK, with bundle configuration and service wiring to help Symfony developers connect to Mirafive APIs quickly and reduce manual setup.
Mira\Flags\MiraFlags per process, so a PM can ship dark features, run percentage rollouts and kill-switch a surface without a redeploy — provided the team is disciplined about reading flags at the right boundary.mirafive/sdk-php. Adopting it means buying the flag/event plane rather than maintaining an in-house flag table, exposure logging, batching and delivery pipeline. The decision to evaluate is "vendor SDK vs. internal flag service," not "this bundle vs. writing our own bundle."kernel.terminate / console.terminate, so backend-only actions (checkout, provisioning, job completion) become measurable without a JS tracker. This unlocks funnel and conversion analysis the front end cannot see.Mira and MiraFlags are no-ops when no secret key is present or enabled: false, the PM can approve shipping instrumented code paths everywhere with a per-environment switch — a real lever for staging vs. production data hygiene and for GDPR-style "collect nothing in EU until reviewed" positions.messenger: true routes buffered batches through Symfony Messenger so requests do not pay the cost of an outbound call; send() remains synchronous for events that must not be dropped. Choosing per-event sync vs. queued is a product decision about durability vs. page latency, and it should be documented in the instrumentation standard.flags.refresh_seconds) with optional cache. Shorter intervals mean faster experiment ramp and faster rollback; longer intervals mean less load. That is a product-visible setting, not just an ops knob.bin/console mirafive:check smoke test, a PM can commit to "launch behind a flag, ramp over N days, remove the flag by date" as a standard lifecycle rather than a per-team negotiation.MiraFake plus the InteractsWithMira trait means test suites can assert flag states and emitted events in CI. This lowers the cost of instrumenting aggressively, which is usually the real bottleneck on measurement quality.Adopt when:
AbstractBundle; despite the framing, it is not a Laravel package — Laravel teams should evaluate the core mirafive/sdk-php or a Laravel adapter instead). Non-Symfony PHP stacks get nothing from this release.kernel.reset and after each handled or failed message, and disables the core's shutdown flush. That is the correct shape for worker safety and is the strongest technical argument for using the bundle rather than hand-wiring the SDK.Cache-Control: private, no-store on the flag bootstrap response is a meaningful default — it prevents a shared cache from serving one user's flag state to another.MIRAFIVE_*) rather than config files holding secrets, and you want secrets to be able to arrive as empty so the SDK becomes a no-op in environments that should not report.Look elsewhere when:
mirafive_flags() bootstraps flags server-side; client-side decisions still depend on that payload.send() or a different transport.Open questions to resolve before adoption: the licence terms, the behaviour when flag fetch fails (fail-open vs. fail-closed), whether test mode and production can be distinguished in reporting, and how secrets are rotated without a redeploy.
To executives — one paragraph. This is a small, standard integration that lets us turn features on and off for specific customers without shipping code, and simultaneously measure what those customers do. That combination is what makes progressive rollout and pricing/packaging experiments possible on a predictable cadence instead of a quarterly release cycle. It is a thin adapter over a vendor SDK we would otherwise wire by hand, so the build cost is near zero and the main commitment is the subscription and roughly a sprint of instrumentation work. The risk is that it is a first release from a single vendor, so I would recommend a bounded pilot on one non-critical surface with a documented fallback before we make it the default.
To engineering — the technical case. It removes bespoke wiring: autowired Mira and a single per-process MiraFlags, config bound to MIRAFIVE_*, and correct lifecycle handling that is genuinely tedious to get right — flush on kernel.terminate and console.terminate, flush on kernel.reset so worker runtimes do not bleed flags or events across requests, and flush after each handled or failed Messenger message with the core's own shutdown hook disabled to avoid double-flushing. Optional DeliverBatch delivery hands the buffered batch to the worker's own client byte for byte, so the payload does not get re-serialised and reshaped. mirafive:check gives us a deploy smoke test, and MiraFake plus InteractsWithMira gives us testable flags. Secret-less or enabled: false environments record nothing, so local and CI stay clean.
To security and compliance. Credentials come from environment variables, not committed config. The flag bootstrap response is marked private, no-store, so flag state cannot be cached and served to the wrong user. The SDK can be disabled per environment, so we can ship the code and enable collection only where it has been reviewed. What we still need from the vendor: data residency, retention, whether payloads can carry PII, and the failure mode when the flag service is unreachable.
The honest caveat to state in the room. The request frames this as a Laravel/PHP package, but v1.0.0 is a Symfony bundle. If the estate is Laravel, this release is not the artefact to adopt — the decision is about the underlying SDK, and this assessment should be re-run against the Laravel integration when there is one. Separately, a first 1.0.0 release with no version history means our recommendation should be a scoped pilot with defined success criteria (rollout lead time, event completeness, no measurable latency regression) rather than a fleet-wide default.
How can I help you explore Laravel packages today?