novaway/NovawayFeatureFlagBundle — reverse-engineered prompt
Reverse engineered prompt
Build me a simple Symfony bundle for managing feature flags in an app.
I want developers to be able to define flags in config, give each one an enabled value and optional description, and then check those flags from PHP services, controllers, Twig templates, routes, and controller attributes. It should support one default manager and also multiple named managers, so teams can separate groups of flags if they want.
Please include a small REST endpoint that can return all configured feature flags, with routing that can be enabled from the host Symfony app. Route and attribute protection should block access when a required flag is enabled or disabled, and allow a custom exception class or factory.
Keep it lightweight and easy to install with Composer. Add clear README examples for installation, configuration, service usage, Twig usage, routing restrictions, attributes, and the API endpoint. Also include tests for the main behavior and make sure it works with maintained Symfony versions.
Want more depth? Deep Reverse