Weave Code
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
Feature Manager Bundle

Feature Manager Bundle Laravel Package

alex-bykovski/feature-manager-bundle

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Feature Manager Bundle
Can I use this package directly in a Laravel project without Symfony?
No, this is a Symfony bundle, but you can adapt it for Laravel by creating a custom facade or service provider to wrap its core logic. Alternatively, reimplement the feature flagging system using Laravel’s native tools like Spatie’s `laravel-feature-flags` as a reference. The core logic (checking feature states) is language-agnostic, so you can abstract it into a Laravel-friendly service.
How do I store feature flags—database, cache, or config files?
The package doesn’t specify storage in its README, but database storage is recommended for scalability. You’ll need to design a schema (e.g., a `features` table with `is_active`, `percentage`, and `user_groups` columns) and configure the bundle to use it. Cache (e.g., Redis) can be layered on top for performance, but ensure cache invalidation is handled properly.
Does this support user segmentation (e.g., enabling features for specific users or roles)?
The bundle likely supports basic user targeting, but the exact implementation depends on how you configure it. You can extend it to support segments by ID, role, or percentage by adding logic in the feature evaluation pipeline. For Laravel, you’d need to integrate this with Laravel’s authentication system (e.g., `Auth::user()`) or pass user context explicitly.
What’s the expected usage pattern for checking if a feature is active?
The bundle typically follows a pattern like `FeatureManager::isActive('feature_name')` or similar. In Laravel, you’d wrap this in a facade (e.g., `Feature::isActive('feature_name')`) for a native feel. The exact method names may vary, so check the Symfony bundle’s documentation or adapt the logic to match Laravel’s conventions.
Is this package actively maintained? Should I use it for production?
The package’s maintenance status isn’t explicitly clear, but you can check its GitHub activity (stars, issues, commits) or contact the author. For production, ensure you test thoroughly, especially if adapting it for Laravel. Consider forking the repo to add Laravel-specific features or using a more Laravel-native alternative like Spatie’s package if maintenance is a concern.
How do I integrate this with Laravel’s service container or middleware?
To integrate with Laravel, bind the Symfony bundle’s services in your `AppServiceProvider` (e.g., `bind('feature.manager', function () { ... })`). For middleware, create a custom `FeatureGateMiddleware` that checks flags before routing. Blade directives can be added via a `BladeServiceProvider` to enable syntax like `@if(feature('name'))`.
Are there any performance considerations for feature flag checks?
Performance depends on storage. Database queries can be slow, so cache feature flags aggressively (e.g., using Redis) with a short TTL. For high-traffic apps, preload flags into memory or use a dedicated feature flag service. The bundle itself doesn’t specify optimizations, so you may need to implement caching layers manually.
Can I use this for A/B testing or gradual rollouts?
Yes, the bundle supports percentage-based rollouts (e.g., enabling a feature for 10% of users). You’d configure this in the feature’s storage (e.g., `percentage = 10`) and pass user context (e.g., user ID) to the evaluation logic. For A/B testing, combine this with Laravel’s request data (e.g., `request()->ip()` or `Auth::user()->id`) to target specific groups.
What Laravel versions does this package support? Any PHP version requirements?
The package doesn’t explicitly state Laravel or PHP version support, but it depends on Symfony components. Laravel 8.0+ (PHP 8.0+) is a safe bet if you’re adapting it, but test thoroughly. Check the Symfony bundle’s `composer.json` for PHP requirements and ensure compatibility with Laravel’s underlying dependencies.
Are there alternatives to this package for Laravel?
Yes, consider Spatie’s `laravel-feature-flags` for a Laravel-native solution with similar functionality. Other options include `laravel-flag` or building a custom solution using Laravel’s cache and database. If you need Symfony integration (e.g., in a hybrid app), this bundle may still be useful, but for pure Laravel, Spatie’s package is more maintainable.
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.
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge