tax16/feature-flag
tax16/feature-flag is a lightweight Laravel package for defining and checking feature flags in your application. Toggle features on or off with simple configuration, keeping releases safer and functionality easy to manage. Ideal for gradual rollouts and environment-specific behavior.
Architecture fit
#[FeaturesFlagSwitchRoute]) to declaratively gate routes and class/method execution. This is a good conceptual fit for teams already standardizing on attribute-based configuration (middleware, validation, authorization), since flag intent lives next to the code it protects rather than in a distant config file.new Service()), static calls, third-party package internals, and long-lived Octane workers may bypass guards entirely. This should be validated, not assumed.Integration feasibility
composer require, publish config, register the service provider (or rely on package discovery), and annotate targets. No schema or infrastructure changes are implied by the release notes.Technical risk
php artisan route:cache can freeze flag state into the compiled route file. A flag flip in production would then require a redeploy and cache rebuild, defeating the purpose of a runtime toggle. This must be confirmed as either handled or documented.FeaturesFlagSwitchRoute reads awkwardly (plural/compound). If this is the public attribute name, it is effectively permanent API surface. Cosmetic, but worth flagging before it spreads across the codebase.Key questions
route:cache and config:cache correctly, and what is the documented behavior after a flag flip without redeploy?new, jobs, commands, Octane)?Note: this assessment is derived solely from the v1.1.1 release notes. Items marked as risks are hypotheses to be confirmed in a time-boxed spike, not confirmed defects.
Stack fit
if (config('features.x')) checks scattered across controllers — the package consolidates that into a declarative, greppable pattern.Migration path
Compatibility
route:cache, config:cache, optimize, Laravel Octane (long-lived workers can cache flag state across requests — a correctness issue, not just performance), queued jobs and console commands, and the test suite's flag-override mechanism.Sequencing
#[FeaturesFlagSwitchRoute]. Success criteria: flag flip changes behavior without redeploy; route cache behaves as documented.Maintenance
Support
Scaling
Failure modes
Ramp-up
How can I help you explore Laravel packages today?