-
Notifications
You must be signed in to change notification settings - Fork 58
Improve performance of setting multiple feature values at once #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.x
Are you sure you want to change the base?
Conversation
| ->map(fn ($bits) => ['feature' => $bits[0], 'scope' => $bits[1], 'value' => $value]) | ||
| ->all(); | ||
|
|
||
| $this->driver->setAll($features); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->driver is our decorator which implements the new contract, so calling setAll here is safe.
| ->map(fn ($bits) => ['feature' => $bits[0], 'scope' => $bits[1], 'value' => false]) | ||
| ->all(); | ||
|
|
||
| $this->driver->setAll($features); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->driver is our decorator which implements the new contract, so calling setAll here is safe.
| /** | ||
| * Set multiple feature flag values. | ||
| * | ||
| * @internal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marked as internal so it doesn't show up on the Facade. This isn't meant to be called directly by the consuming application.
Continuation of the great work done in #156 by @nandi95
Adds support for an optional new contract that allows for more efficient batch updates.
Our first party drivers implement the driver by default.