Skip to content

Commit e3c659a

Browse files
committed
Fixes upgrade pour PHPUnit et ylsideas/feature-flag
1 parent 18354b7 commit e3c659a

File tree

3 files changed

+42
-37
lines changed

3 files changed

+42
-37
lines changed

.features.php

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Illuminate\Contracts\Foundation\Application;
4+
5+
/**
6+
* @returns array<string, bool>
7+
*/
8+
return static function (Application $app): array {
9+
return [
10+
'roleplay' => true,
11+
'roleplay-only-restricted' => false,
12+
'cache' => true,
13+
'subdivision' => false,
14+
];
15+
};

config/features.php

+26-36
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,49 @@
33
return [
44
/*
55
|--------------------------------------------------------------------------
6-
| default
6+
| Pipeline
77
|--------------------------------------------------------------------------
88
|
9-
| The repository to use for establishing a feature's on/off state.
9+
| The pipeline for the feature to travel through.
1010
|
1111
*/
1212

13-
'default' => 'config',
13+
'pipeline' => ['in_memory'],
1414

1515
/*
1616
|--------------------------------------------------------------------------
17-
| Config Feature Switches
17+
| Gateways
1818
|--------------------------------------------------------------------------
1919
|
20-
| This is a set of features to load into the config features repository.
20+
| Configures the different gateway options
2121
|
2222
*/
2323

24-
'feature' => [
25-
'roleplay' => true,
26-
'roleplay-only-restricted' => false,
27-
'cache' => true,
28-
'subdivision' => false,
29-
],
30-
31-
/*
32-
|--------------------------------------------------------------------------
33-
| Repositories
34-
|--------------------------------------------------------------------------
35-
|
36-
| Configures the different repository options
37-
|
38-
*/
39-
40-
'repositories' => [
24+
'gateways' => [
25+
'in_memory' => [
26+
'file' => env('FEATURE_FLAG_IN_MEMORY_FILE', '.features.php'),
27+
'driver' => 'in_memory',
28+
],
4129
'database' => [
42-
'table' => 'features',
30+
'driver' => 'database',
31+
'cache' => [
32+
'ttl' => 600,
33+
],
34+
'connection' => env('FEATURE_FLAG_DATABASE_CONNECTION'),
35+
'table' => env('FEATURE_FLAG_DATABASE_TABLE', 'features'),
4336
],
44-
'config' => [
45-
'key' => 'features.feature',
37+
'gate' => [
38+
'driver' => 'gate',
39+
'gate' => env('FEATURE_FLAG_GATE_GATE', 'feature'),
40+
'guard' => env('FEATURE_FLAG_GATE_GUARD'),
41+
'cache' => [
42+
'ttl' => 600,
43+
],
4644
],
4745
'redis' => [
48-
'prefix' => 'features',
49-
'connection' => 'default',
50-
],
51-
'chain' => [
52-
'drivers' => [
53-
'config',
54-
'redis',
55-
'database',
56-
],
57-
'store' => 'database',
58-
'update_on_resolve' => true,
46+
'driver' => 'redis',
47+
'prefix' => env('FEATURE_FLAG_REDIS_PREFIX', 'features'),
48+
'connection' => env('FEATURE_FLAG_REDIS_CONNECTION', 'default'),
5949
],
6050
],
6151
];

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<directory suffix="Test.php">./tests/Feature</directory>
1515
</testsuite>
1616
</testsuites>
17-
<coverage processUncoveredFiles="true">
17+
<coverage>
1818
<include>
1919
<directory suffix=".php">./app</directory>
2020
</include>

0 commit comments

Comments
 (0)