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
Shizuku Feature Flags

Shizuku Feature Flags Laravel Package

devexploris/shizuku-feature-flags

Symfony bundle to manage feature flags stored in Doctrine ORM. Toggle features from the database, check flags in PHP via FeatureFlagService or in Twig with the feature() function, and manage flags with CLI commands to list, create, enable, and disable.

View on GitHub
Deep Wiki
Context7

A symfony bundle for manage feature flags

Frequently asked questions about Shizuku Feature Flags
Can I use Shizuku Feature Flags directly in Laravel without modifications?
No, Shizuku is designed for Symfony and relies on Doctrine ORM, Symfony Cache, Twig, and Symfony Profiler. Laravel’s Eloquent, Blade, and Artisan require a fork or abstraction layer to integrate it. Direct use will fail due to these incompatibilities.
What’s the easiest way to integrate Shizuku into Laravel?
The simplest approach is to fork the repository and rewrite the core components: replace Doctrine with Eloquent models, Symfony Cache with Laravel Cache (adjusting invalidation logic), Twig with Blade directives/helpers, and Symfony Profiler with Laravel Debugbar. This requires moderate PHP and Laravel expertise.
How do I check feature flags in Blade templates if Shizuku uses Twig?
Create a Blade directive or helper (e.g., `@feature('flag_name')`) to replicate Twig’s global `feature()` function. For example, register a helper in `app/Providers/AppServiceProvider` to expose a `feature()` function that queries your Eloquent-based flag model.
Does Shizuku support multi-tenancy in Laravel?
No, Shizuku does not natively support multi-tenancy. To adapt it for Laravel’s multi-tenant setups (e.g., Eloquent’s `tenant()`), you’d need to extend the Eloquent model with tenant-aware queries or use middleware to scope flags per tenant. Consider packages like Stancl/Tenant for integration.
Are there Laravel-native alternatives to Shizuku?
Yes, consider Spatie’s `laravel-feature-flags` or `spatie/laravel-activitylog` for feature flags. These packages are built for Laravel, use Eloquent, and integrate with Blade, Artisan, and Laravel’s caching systems without refactoring. They also offer more Laravel-specific features like Scout caching and Livewire support.
How does Shizuku’s caching work, and will it conflict with Laravel’s cache drivers?
Shizuku uses Symfony Cache with a 300-second TTL and invalidates on flag changes. In Laravel, you’d need to replace this with Laravel Cache (Redis, database, etc.) and manually handle invalidation via cache tags or `cache()->forget()`. Test performance with your chosen driver, as Redis may offer faster invalidation than database caching.
Can I use Shizuku’s CLI commands in Laravel?
No, Shizuku’s commands are Symfony Console-based and won’t work in Laravel’s Artisan. You’d need to rewrite them as Artisan commands (e.g., `php artisan shizuku:flag:create`) using Laravel’s `Command` class. Interactive prompts may require additional libraries like `symfony/console` or custom Laravel input handling.
Will Shizuku’s performance compare to native Laravel feature flag solutions?
Performance depends on your ORM and cache setup. Eloquent queries are generally comparable to Doctrine for simple flag lookups, but Shizuku’s caching layer (300s TTL) may introduce slight latency. Laravel’s Redis cache driver is optimized for low-latency invalidation, while database caching could add overhead. Benchmark with your stack.
How do I handle real-time flag updates in Livewire or Inertia?
Shizuku doesn’t support real-time updates out of the box. For Livewire/Inertia, you’d need to broadcast flag changes via Laravel Echo/Pusher or implement a polling mechanism. Alternatively, use a Laravel-native package like Spatie’s, which offers built-in Livewire integration for dynamic flag toggling.
What’s the fallback if I can’t adapt Shizuku for Laravel?
Use a Laravel-specific package like Spatie’s `laravel-feature-flags` or build a custom solution with Eloquent models, Blade helpers, and Artisan commands. Spatie’s package is actively maintained, integrates with Laravel’s ecosystem, and avoids Symfony dependencies entirely. A custom solution gives full control but requires more upfront development.
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor