File tree 2 files changed +9
-2
lines changed
src/Symfony/Component/FeatureFlag
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \FeatureFlag ;
13
13
14
14
use Symfony \Component \FeatureFlag \Provider \ProviderInterface ;
15
+ use Symfony \Contracts \Service \ResetInterface ;
15
16
16
17
/**
17
18
* @experimental
18
19
*/
19
- final class FeatureChecker implements FeatureCheckerInterface
20
+ final class FeatureChecker implements FeatureCheckerInterface, ResetInterface
20
21
{
21
22
private array $ cache = [];
22
23
@@ -40,4 +41,9 @@ public function getValue(string $featureName): mixed
40
41
41
42
return $ this ->cache [$ featureName ] = $ feature ();
42
43
}
44
+
45
+ public function reset (): void
46
+ {
47
+ $ this ->cache = [];
48
+ }
43
49
}
Original file line number Diff line number Diff line change 17
17
],
18
18
"require" : {
19
19
"php" : " >=8.2" ,
20
- "psr/container" : " ^1.1|^2.0"
20
+ "psr/container" : " ^1.1|^2.0" ,
21
+ "symfony/service-contracts" : " ^2.5|^3"
21
22
},
22
23
"require-dev" : {
23
24
"symfony/http-kernel" : " ^7.2" ,
You can’t perform that action at this time.
0 commit comments