File tree Expand file tree Collapse file tree 3 files changed +36
-30
lines changed
Expand file tree Collapse file tree 3 files changed +36
-30
lines changed Original file line number Diff line number Diff line change @@ -4,28 +4,27 @@ on: [push]
44
55jobs :
66 test :
7- runs-on : ubuntu-20.04
7+ runs-on : ubuntu-22.04
8+
9+ strategy :
10+ fail-fast : true
11+ matrix :
12+ php : [ 8.1, 8.2 ]
13+
14+ name : PHP ${{ matrix.php }}
815
916 steps :
10- - uses : actions/checkout@v2
17+ - uses : actions/checkout@v3
1118
1219 - name : Setup PHP
1320 uses : shivammathur/setup-php@v2
1421 with :
15- php-version : ' 8.0 '
22+ php-version : ${{ matrix.php }}
1623 extensions : zip, sqlite3
1724 coverage : none
1825
19- - name : Restore caches
20- uses : actions/cache@v2
21- with :
22- path : ~/.composer/cache/files
23- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
24- restore-keys : |
25- ${{ runner.os }}-composer-
26-
2726 - name : Install composer dependencies
28- run : composer install --no-ansi --no-interaction --no-scripts --no- progress --prefer-dist
27+ run : composer install --prefer-dist --no-interaction --no-progress
2928
3029 - name : Code sniff
3130 run : vendor/bin/php-cs-fixer fix --dry-run
Original file line number Diff line number Diff line change 1818 }
1919 ],
2020 "require" : {
21- "php" : " ^8.0" ,
22- "illuminate/contracts" : " ^7.0|^8.0|^9.0" ,
23- "spatie/enum" : " ^3.12" ,
24- "spatie/laravel-package-tools" : " ^1.9.2"
21+ "php" : " ^8.1" ,
22+ "illuminate/contracts" : " ^10.0" ,
23+ "spatie/laravel-package-tools" : " ^1.14.1"
2524 },
2625 "require-dev" : {
2726 "codinglabsau/php-styles" : " dev-main" ,
28- "nunomaduro/collision" : " ^6.0" ,
29- "orchestra/testbench" : " ^7.0" ,
30- "pestphp/pest" : " ^1.21" ,
31- "pestphp/pest-plugin-laravel" : " ^1.1" ,
32- "phpunit/phpunit" : " ^9.5" ,
33- "spatie/laravel-ray" : " ^1.26"
27+ "orchestra/testbench" : " ^8.0.1" ,
28+ "pestphp/pest" : " ^2.0" ,
29+ "pestphp/pest-plugin-laravel" : " ^2.0"
3430 },
3531 "autoload" : {
3632 "psr-4" : {
Original file line number Diff line number Diff line change 22
33namespace Codinglabs \FeatureFlags \Enums ;
44
5- use Spatie \Enum \Enum ;
6-
7- /**
8- * @method static self on()
9- * @method static self off()
10- * @method static self dynamic()
11- */
12- class FeatureState extends Enum
5+ enum FeatureState: string
136{
7+ case ON = 'on ' ;
8+ case OFF = 'off ' ;
9+ case DYNAMIC = 'dynamic ' ;
10+
11+ public static function on (): self
12+ {
13+ return self ::ON ;
14+ }
15+
16+ public static function off (): self
17+ {
18+ return self ::OFF ;
19+ }
20+
21+ public static function dynamic (): self
22+ {
23+ return self ::DYNAMIC ;
24+ }
1425}
You can’t perform that action at this time.
0 commit comments