Feature Flags
Version 1.1.0
June 5, 2026
Added
- Multi-site support: flags can apply to all sites (default) or be scoped to specific sites on multi-site installs (#1)
- Sites are an explicit opt-in: a flag scoped to specific sites is off on any site you don't enable, including sites added later
- Optional
siteIdargument onisEnabled()(PHP and Twig) to evaluate a flag for a specific site Flag::$siteSettingsmodel property- Rollout strategy per flag: All visitors (targeting rules and rollout are independent paths — the default) or Rule-matched only (the rollout percentage filters within the rule-matched audience)
Changed
- Evaluation now applies a per-site gate (after the master switch, before targeting rules) on multi-site installs. Targeting rules are evaluated only on sites where the flag is enabled
- Per-site evaluation fails closed for site-scoped flags when no site can be resolved (console/queue without an explicit
siteId, or an unknownsiteId); pass an explicit, validsiteIdfor a reliable per-site answer outside web requests - The per-request evaluation cache key now includes the requested site context
- Cache version bumped (stored flag objects are refreshed on upgrade)
Fixed
- The "Subscription Plan" rule type now appears in the flag editor when Craft Commerce is installed (it was previously always hidden because of a missing import)
Version 1.0.1
May 29, 2026
Fixed
- Save and edit with keyboard combo fixed for Flags
Added
- Save and add another keyboard combo for Flags
Version 1.0.0
May 15, 2026
Added
- Feature flag management with enable/disable toggle
- Flag types: release, experiment, ops, permission
- Human-readable name and kebab-case handle for each flag
- Targeting rules: user ID, user group, environment
- Subscription plan targeting (requires Craft Commerce)
- Percentage-based rollout with consistent user bucketing
- Anonymous visitor bucketing via
$bucketKeyparameter and configurable cookie EvaluationService::computeBucket()static helper for rollout hash- Optional flag expiration dates
- Three-layer caching: per-request, application cache, database
- Configurable cache TTL (default 60 seconds)
- Versioned cache keys via
FlagService::CACHE_VERSION - Audit logging with user attribution
- Configurable audit log toggle
- Custom plugin name setting
- Extensible rule types via
RegisterRuleTypesEvent - Custom rule evaluation via
EvaluateRuleEvent - Twig variable:
craft.featureFlags.isEnabled('flag-handle') - PHP API:
FeatureFlags::getInstance()->evaluationService->isEnabled('flag-handle') - CP permissions: view and manage
- Console commands: list, info, enable, disable, delete, cleanup-expired
- PHPUnit test suite covering bucket math, distribution, handle generation, and flag types