yannickl88/features-bundle
Symfony bundle for adding feature flags to your application. Define features, enable or disable them per environment, and gate code paths with simple checks for safer rollouts, gradual releases, and controlled deployments.
Architecture fit. This is a Symfony bundle, not a Laravel package, and that distinction drives the entire evaluation. Bundles are Symfony's extension mechanism: they rely on a Bundle class, DependencyInjection/Extension, Resources/config service definitions, compiler passes, kernel boot lifecycle, and the Symfony event dispatcher. Laravel has no bundle concept — it uses service providers, facades, and container bindings. As a result, this cannot be installed and used in a Laravel application the way a normal package would. Only the underlying feature-tag evaluation logic (if it is decoupled from the framework) is potentially reusable; the packaging and wiring are not.
Integration feasibility. Conditional and unproven. If flag evaluation lives in plain PHP classes with injectable storage, a TPM can sponsor a thin adapter: a Laravel service provider registering readers/strategies, a config file, and a facade. If the logic is entangled with DI tags, compiler passes, and console commands, "integration" becomes a fork. Given 19 stars, zero dependents, and minimal documentation signal, feasibility must be validated by a time-boxed spike rather than assumed.
Technical risk. High. Single-maintainer project with low adoption and no downstream dependents means no production evidence. Symfony major-version churn (5/6/7) creates compatibility drift, and because Laravel transitively pins Symfony components, a constraint mismatch is a realistic blocker. Feature flags sit on a correctness-sensitive path — release gating, entitlements, kill switches — so a low-maturity dependency there is an availability and correctness risk, not just a hygiene concern. Abandonment risk is material; plan to own the code.
Key questions.
symfony/* version constraints are declared, and do they overlap with what Laravel 10/11 ship?Stack fit. Poor for Laravel as delivered; natural for Symfony services. In a mixed PHP estate, the pragmatic split is: use the bundle only where Symfony already runs, and do not attempt to force it into Laravel. For Laravel, the realistic options are (a) extract the core into a shared framework-neutral library, (b) fork and re-wrap, or (c) replace with a Laravel-native or vendor solution (Laravel Pennant, Unleash, LaunchDarkly) and skip this bundle entirely. Given the score and adoption signals, (c) deserves serious weight.
Migration path. Start with a two-week discovery spike: read the source, identify coupling seams, and attempt to instantiate the evaluation classes outside a Symfony kernel. If that succeeds cleanly, build a thin Laravel package — service provider, publishable config, facade, and a cache-aware evaluator behind an interface. If it fails, stop and either fork only the reusable logic or select an alternative. Do not attempt a big-bang migration; flag call sites are cross-cutting and numerous.
Compatibility. Inspect composer.json for PHP and symfony/* constraints against the host Laravel version's transitive Symfony component majors. A mismatch forces either a resolution conflict or unrelated upgrades elsewhere in the stack. Also confirm PSR-4 autoloading and check whether the bundle registers global helpers, attributes, or container aliases that could collide with existing Laravel bindings.
Sequencing.
FeatureResolver interface so it is swappable later.Maintenance. One maintainer, 19 stars, zero dependents, last release June 2024. Low bus factor and a thin community mean you should budget for owning a fork. Pin versions, vendor the code if adopted, and treat upstream as a starting point rather than a dependency you can lean on.
Support. No commercial backing; issue and PR turnaround depends on maintainer availability. Assign an internal owner and write internal documentation. For anything gating releases, define an internal SLA and escalation path rather than relying on upstream responsiveness.
Scaling. Evaluation cost itself is likely negligible — in-memory or config lookups. The real scaling questions are the flag source and propagation: if flags are read per-request from a file or database, ensure caching and a clear invalidation strategy across nodes. Under Octane or other long-lived workers, verify that flag changes are visible without a process restart.
Failure modes. Bundle bootstrapping fails outside a Symfony kernel; Symfony component version conflicts break Composer resolution; config caching is incompatible; upstream abandonment leaves bugs and security advisories unpatched; evaluation errors silently enable or disable features — decide explicitly between fail-open and fail-closed per flag class. Add flag lifecycle governance so stale flags do not accumulate indefinitely.
Ramp-up. Engineers must understand Symfony bundle conventions — extensions, compiler passes, DI tags — even to evaluate this, which is non-trivial for a Laravel-only team. Estimate one to two engineer-weeks for the spike plus adapter, plus ongoing ownership. Before rollout, document the flag taxonomy, default values, and kill-switch behavior so on-call can reason about failures without reading the bundle source.
How can I help you explore Laravel packages today?