Skip to content

Commit 010b27d

Browse files
authored
fix: prevent ConfigCat::override() to be used in production (#7)
Instead of only allowing it to be used in `testing` environment, we're only making sure it's not used in `production` so it can also be used on other environments such as `dusk` or `staging`.
1 parent 485aa85 commit 010b27d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ConfigCat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function overrides(string $filepath): ?FlagOverrides
9595
*/
9696
public function override(array $flagsToOverride)
9797
{
98-
if (app()->environment('testing') && $this->overridesFilePath) {
98+
if (! app()->environment('production') && $this->overridesFilePath) {
9999
File::put(self::localFile($this->overridesFilePath), json_encode([
100100
'flags' => $flagsToOverride,
101101
]));

0 commit comments

Comments
 (0)