Skip to content

feat: both config and db flags#13

Merged
shavonn merged 3 commits into
mainfrom
feat/both-flag-types
Apr 27, 2026
Merged

feat: both config and db flags#13
shavonn merged 3 commits into
mainfrom
feat/both-flag-types

Conversation

@shavonn
Copy link
Copy Markdown
Contributor

@shavonn shavonn commented Apr 27, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 27, 2026 15:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds per-flag driver routing so an application can mix config-driven (read-only) flags with database-driven (runtime-mutable) flags via a new database_flags config option, with tests and documentation updates.

Changes:

  • Introduces PerFlagDriver and wires it into ToggleServiceProvider when database_flags is configured.
  • Adds overlap validation that logs a warning when the same flag appears in both flags and database_flags.
  • Adds feature tests and updates package docs/config comments to describe the new behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/ToggleServiceProvider.php Creates PerFlagDriver when database_flags is set; adds overlap validation warning on boot.
src/Drivers/PerFlagDriver.php Implements routing logic per-flag and merges all() results across drivers.
config/toggle.php Documents config-driven vs database-driven flags and introduces database_flags config key.
README.md Documents per-flag driver routing usage and resolution rules.
tests/Feature/PerFlagDriverTest.php Adds coverage for config/db routing, precedence, all(), and overlap warning logging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread tests/Feature/PerFlagDriverTest.php Outdated
Comment thread src/Drivers/PerFlagDriver.php
Comment thread src/Drivers/PerFlagDriver.php
Comment thread src/ToggleServiceProvider.php
Comment thread config/toggle.php Outdated
@shavonn shavonn merged commit 4768411 into main Apr 27, 2026
10 checks passed
@shavonn shavonn deleted the feat/both-flag-types branch April 27, 2026 15:16
@github-actions github-actions Bot mentioned this pull request Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants