File tree Expand file tree Collapse file tree 10 files changed +200
-73
lines changed Expand file tree Collapse file tree 10 files changed +200
-73
lines changed Original file line number Diff line number Diff line change 4
4
phpstan :
5
5
runs-on : ubuntu-latest
6
6
steps :
7
- - uses : actions/checkout@v2
8
- - uses : actions/cache@v2
7
+ - uses : actions/checkout@v3
8
+ - uses : actions/cache@v3
9
9
with :
10
10
path : ' **/vendor'
11
11
key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12
12
restore-keys : |
13
13
${{ runner.os }}-composer-
14
- - uses : php-actions/composer@v5
14
+ - uses : php-actions/composer@v6
15
15
with :
16
16
args : --prefer-dist
17
- php_version : 8.0
18
-
17
+ php_version : 8.2
19
18
- name : PHPStan
20
- uses : php-actions/phpstan@v2
19
+ uses : php-actions/phpstan@v3
21
20
with :
22
21
path : src/
23
22
args : --level=5
Original file line number Diff line number Diff line change 4
4
phpstan :
5
5
runs-on : ubuntu-latest
6
6
steps :
7
- - uses : actions/checkout@v2
8
- - uses : actions/cache@v2
7
+ - uses : actions/checkout@v3
8
+ - uses : actions/cache@v3
9
9
with :
10
10
path : ' **/vendor'
11
11
key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12
12
restore-keys : |
13
13
${{ runner.os }}-composer-
14
- - uses : php-actions/composer@v5
14
+ - uses : php-actions/composer@v6
15
15
with :
16
16
args : --prefer-dist
17
- php_version : 8.0
17
+ php_version : 8.2
18
18
19
19
- name : PHPStan
20
- uses : php-actions/phpstan@v2
20
+ uses : php-actions/phpstan@v3
21
21
with :
22
22
path : src/
23
23
args : --level=5
Original file line number Diff line number Diff line change 4
4
phpstan :
5
5
runs-on : ubuntu-latest
6
6
steps :
7
- - uses : actions/checkout@v2
8
- - uses : actions/cache@v2
7
+ - uses : actions/checkout@v3
8
+ - uses : actions/cache@v3
9
9
with :
10
10
path : ' **/vendor'
11
11
key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12
12
restore-keys : |
13
13
${{ runner.os }}-composer-
14
- - uses : php-actions/composer@v5
14
+ - uses : php-actions/composer@v6
15
15
with :
16
16
args : --prefer-dist
17
- php_version : 8.0
17
+ php_version : 8.2
18
18
19
19
- name : PHPStan
20
- uses : php-actions/phpstan@v2
20
+ uses : php-actions/phpstan@v3
21
21
with :
22
22
path : src/
23
23
args : --level=5
Original file line number Diff line number Diff line change
1
+ name : Mutations
2
+ on : push
3
+ jobs :
4
+ phpunit :
5
+ runs-on : ubuntu-latest
6
+ steps :
7
+ - uses : actions/checkout@v3
8
+ - uses : shivammathur/setup-php@v2
9
+ with :
10
+ php-version : ' 8.2'
11
+ tools : composer:v2
12
+ coverage : pcov
13
+ - uses : actions/cache@v2
14
+ with :
15
+ path : ' **/vendor'
16
+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
17
+ restore-keys : |
18
+ ${{ runner.os }}-composer-
19
+ - uses : php-actions/composer@v6
20
+ with :
21
+ args : --prefer-dist
22
+ php_version : 8.2
23
+ - name : Run tests & generate Coverage
24
+ run : bin/phpunit --configuration=phpunit.xml tests --coverage-html var/coverage --whitelist=src
25
+ - name : Store coverage files
26
+ uses : actions/upload-artifact@v2
27
+ with :
28
+ path : var/coverage
Original file line number Diff line number Diff line change 4
4
cs-fixer :
5
5
runs-on : ubuntu-latest
6
6
steps :
7
- - uses : actions/checkout@v2
7
+ - uses : actions/checkout@v3
8
8
- name : Cs-Fixer
9
9
run : |
10
- wget -q https://cs.symfony.com/download/php-cs-fixer-v2 .phar -O php-cs-fixer
10
+ wget -q https://cs.symfony.com/download/php-cs-fixer-v3 .phar -O php-cs-fixer
11
11
chmod a+x php-cs-fixer
12
12
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run
13
-
14
- phpunit :
15
- runs-on : ubuntu-latest
16
- steps :
17
- - uses : actions/checkout@v2
18
- - uses : shivammathur/setup-php@v2
19
- with :
20
- php-version : ' 8.0'
21
- tools : composer:v2
22
- coverage : pcov
23
- - uses : actions/cache@v2
24
- with :
25
- path : ' **/vendor'
26
- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
27
- restore-keys : |
28
- ${{ runner.os }}-composer-
29
- - uses : php-actions/composer@v5
30
- with :
31
- args : --prefer-dist
32
- php_version : 8.0
33
-
34
- - name : Run tests & generate Coverage
35
- run : bin/phpunit --configuration=phpunit.xml tests --coverage-html var/coverage --whitelist=src
36
-
37
- - name : Store coverage files
38
- uses : actions/upload-artifact@v2
39
- with :
40
- path : var/coverage
41
-
42
- phpstan :
43
- runs-on : ubuntu-latest
44
- steps :
45
- - uses : actions/checkout@v2
46
- - uses : actions/cache@v2
47
- with :
48
- path : ' **/vendor'
49
- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
50
- restore-keys : |
51
- ${{ runner.os }}-composer-
52
- - uses : php-actions/composer@v5
53
- with :
54
- args : --prefer-dist
55
- php_version : 8.0
56
-
57
- - name : PHPStan
58
- uses : php-actions/phpstan@v2
59
- with :
60
- path : src/
61
- args : --level=4
Original file line number Diff line number Diff line change 7
7
return (new PhpCsFixer \Config ())
8
8
->setRiskyAllowed (true )
9
9
->setRules ([
10
+ '@PHP82Migration ' => true ,
10
11
'@PHP81Migration ' => true ,
11
12
'@PHP80Migration:risky ' => true ,
12
13
'@PHPUnit84Migration:risky ' => true ,
Original file line number Diff line number Diff line change 16
16
"minimum-stability" : " dev" ,
17
17
"prefer-stable" : true ,
18
18
"require" : {
19
- "php" : " ^8.0 " ,
19
+ "php" : " ^8.2 " ,
20
20
"symfony/console" : " ^5.2" ,
21
21
"php-etl/pipeline-contracts" : " ^0.3.0" ,
22
22
"php-etl/console-state" : " ^0.1.0"
33
33
"branch-alias" : {
34
34
"dev-main" : " 0.1.x-dev"
35
35
}
36
+ },
37
+ "require-dev" : {
38
+ "rector/rector" : " ^0.15.21"
36
39
}
37
40
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ use Rector \CodeQuality \Rector \Class_ \InlineConstructorDefaultToPropertyRector ;
6
+ use Rector \Config \RectorConfig ;
7
+ use Rector \PHPUnit \Set \PHPUnitLevelSetList ;
8
+ use Rector \Set \ValueObject \LevelSetList ;
9
+ use Rector \Symfony \Set \SymfonyLevelSetList ;
10
+
11
+ return static function (RectorConfig $ rectorConfig ): void {
12
+ $ rectorConfig ->paths ([
13
+ __DIR__ . '/src ' ,
14
+ __DIR__ . '/tests ' ,
15
+ ]);
16
+
17
+ $ rectorConfig ->rule (InlineConstructorDefaultToPropertyRector::class);
18
+
19
+ $ rectorConfig ->sets ([
20
+ LevelSetList::UP_TO_PHP_82 ,
21
+ PHPUnitLevelSetList::UP_TO_PHPUNIT_100 ,
22
+ SymfonyLevelSetList::UP_TO_SYMFONY_60 ,
23
+ ]);
24
+ };
Original file line number Diff line number Diff line change 11
11
12
12
final class Console implements ActionRuntimeInterface
13
13
{
14
- private State \StateOutput \Action $ state ;
14
+ private readonly State \StateOutput \Action $ state ;
15
15
16
16
public function __construct (
17
17
ConsoleOutput $ output ,
18
- private ExecutingActionInterface $ action ,
18
+ private readonly ExecutingActionInterface $ action ,
19
19
?State \StateOutput \Action $ state = null
20
20
) {
21
21
$ this ->state = $ state ?? new State \StateOutput \Action ($ output , 'A ' , 'Action ' );
You can’t perform that action at this time.
0 commit comments