Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Flagception Bundle

Flagception Bundle Laravel Package

flagception/flagception-bundle

A Symfony bundle for feature flags and toggles. Define flags, activate them by context or constraints, and check them in controllers, services, Twig templates, and annotations. Integrates Flagception with Symfony configuration and dependency injection.

View on GitHub
Deep Wiki
Context7

FlagceptionBundle integrates the Flagception feature-flag library into Symfony, giving applications a clean way to enable or disable functionality without redeploying. Define feature toggles in configuration and evaluate them at runtime using context-aware activators, annotations, or Twig helpers.

  • YAML-based feature and activator configuration
  • @Feature annotation support for controllers and services
  • Twig function for conditional templates
  • Context-aware activation rules and custom activators
  • Native Symfony DI integration
Frequently asked questions about Flagception Bundle
Can I use flagception/flagception-bundle in a Laravel application?
No. flagception/flagception-bundle is a Symfony bundle built around Symfony DependencyInjection config trees, compiler passes, a Twig extension, an annotation guard, and a Web Profiler panel, none of which have a Laravel counterpart. Dropping it into a Laravel app would require pulling in symfony/dependency-injection and symfony/http-kernel, which is not viable for a normal application. If you want Flagception behavior in Laravel, consume the framework-agnostic flagception/flagception core library instead.
What does flagception/flagception-bundle actually do?
It integrates the Flagception feature-flag library into Symfony. You define feature toggles in configuration, enable them per environment or user, and check them in controllers, services, Twig templates, or via the @Feature annotation. The bundle supplies the flagception: config tree, compiler passes that register activators, a feature() Twig helper, a console debug command, and a profiler panel.
Is flagception/flagception-bundle a replacement for Laravel Pennant?
No. It targets Symfony, while Laravel Pennant is the first-party feature-flag package for Laravel 11 and later. The only meaningful delta Flagception may offer is ordered activator chains and expression-based targeting, which is real but narrow. For most Laravel teams, Pennant or an external service such as Unleash, Flagsmith, or LaunchDarkly is the safer default.
How would I install and configure Flagception in Laravel?
Do not require the bundle. Require flagception/flagception, bind its FeatureManagerInterface as a singleton in a service provider, publish a config file that mirrors the activator list, hydrate the request Context in middleware, and reuse Illuminate\Cache\Repository since it already satisfies PSR-16. Expose a Blade directive for template checks and keep the integration behind an internal contract so the blast radius stays small. Expect roughly one to two engineer-weeks for the glue.
Which Laravel and PHP versions are supported?
The bundle itself follows Symfony version constraints, not Laravel ones. The underlying flagception/flagception core is framework-agnostic and can be targeted at Laravel 10, 11, or 12 on PHP 8.2 and above. Before committing, check the upstream composer.json for PHP 8.3 and 8.4 support and review the Symfony dependency constraints it pulls in.
Does Flagception work with Laravel's cache or PSR-16?
The core evaluator supports a PSR-16 cache, and Laravel's Illuminate\Cache\Repository already satisfies PSR-16, so you can pass it directly without an adapter. The bundle's cache configuration, however, is Symfony container configuration and will not carry over. Also decide explicitly whether flag evaluation should fail open or fail closed when the cache backend is unavailable.
What are the alternatives to Flagception for feature flags in Laravel?
Laravel Pennant is the first-party option and the natural baseline. External services such as Unleash, Flagsmith, and LaunchDarkly cover hosted flag management, targeting, and audit needs. A simple config- or database-backed custom implementation is often enough for small teams. Flagception is only worth the integration effort if you specifically need its ordered activator chain and expression-based targeting model.
Is flagception/flagception-bundle actively maintained and safe for production?
The license is MIT, so commercial use is clean. The adoption signals are weak: zero dependents, around 30 stars, effectively single-vendor maintenance by PlayOX with a bus factor near one, and an anomalous release date of 2026-06-01 that should be verified against repository tags. Code risk is low, but adoption and maintenance risk are moderate to high, so treat it as unproven in Laravel stacks.
How should I test feature flags if I integrate Flagception with Laravel?
Define your own FeatureFlags contract with a single isActive method and bind a fake implementation in tests, so most tests never touch the library. For integration tests, use the array cache driver and toggle activators explicitly to exercise both enabled and disabled paths. Cover the failure behavior when an activator throws or the cache is unavailable, and keep flag defaults explicit in config.
Can I use the Twig feature() helper or @Feature annotation in Laravel?
No. The Twig extension, the @Feature annotation or attribute guard, the console debug command, and the Web Profiler panel are all Symfony-specific integration surfaces. In Laravel, the equivalents are a Blade directive, middleware or controller and service injection, and an Artisan command if you need debugging output. Plan to reimplement those conveniences rather than reuse them.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console