pennant icon indicating copy to clipboard operation
pennant copied to clipboard

A simple, lightweight library for managing feature flags.

Results 7 pennant issues
Sort by recently updated
recently updated
newest added

Database driver does not work at scale, we have thousand of `SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "features_name_scope_unique"` because of the driver architecture when you...

bug

fixes #101 ## Problem Laravel Pennant implements a unique constraint that can cause race conditions: https://github.com/laravel/pennant/blob/83178d76f41d45276da9ce37cf7d76c9f5b28945/database/migrations/2022_11_01_000001_create_features_table.php#L23 The race condition can be illustrated with the following application setup: ```sh echo "Create...

I want to be able to check if any of a user's related models have a particular feature enabled. ```php $schools = $user->loadMissing('schools'); $featureIsActive = Feature::for($schools)->someAreActive('enrolled-in-beta'); ``` But this actually...

My project requires scoping features across multiple different models. Quick example: ``` Feature::define('beta-design', function(Team $team)...) Feature::define('password', function(User $user)...) ``` When I configure this a Service provider, all calls to `all()`...

enhancement

Adds a new `activeOrFail` (taking the naming convention from Eloquent models) method to check if a feature is active, throwing an exception if it isn’t. The motivation for this method...

This should resolve https://github.com/laravel/pennant/issues/112 We are building a feature flags endpoint for our mobile and web consumers. We need to be able to get all features for 3-4 scopes which...