Skip to content

Commit 5fe30e5

Browse files
authored
Merge pull request #2 from php-etl/feature/qualityflow-improvments
Add a phpstan lvl 6, Add rector action with Symfony and phpunit confi…
2 parents 85078bb + 7ae1ade commit 5fe30e5

30 files changed

+2394
-66
lines changed

.github/workflows/phpstan-5.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ jobs:
44
phpstan:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/cache@v2
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
99
with:
1010
path: '**/vendor'
1111
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
1212
restore-keys: |
1313
${{ runner.os }}-composer-
14-
- uses: php-actions/composer@v5
14+
- uses: php-actions/composer@v6
1515
with:
1616
args: --prefer-dist
17-
php_version: 8.0
18-
- name: PHPStan
19-
uses: php-actions/phpstan@v2
20-
with:
21-
path: src/
22-
level: 4
23-
php_version: 8.0
17+
php_version: '8.2'
18+
19+
- name: PHPStan
20+
uses: php-actions/phpstan@v3
21+
with:
22+
path: src/
23+
level: 5
24+
php_version: '8.2'

.github/workflows/phpstan-6.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PHPStan level 6
2+
on: push
3+
jobs:
4+
phpstan:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
9+
with:
10+
path: '**/vendor'
11+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12+
restore-keys: |
13+
${{ runner.os }}-composer-
14+
- uses: php-actions/composer@v6
15+
with:
16+
args: --prefer-dist
17+
php_version: '8.2'
18+
- name: PHPStan
19+
uses: php-actions/phpstan@v3
20+
with:
21+
path: src/
22+
level: 6
23+
php_version: '8.2'

.github/workflows/phpstan-7.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ jobs:
44
phpstan:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/cache@v2
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
99
with:
1010
path: '**/vendor'
1111
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
1212
restore-keys: |
1313
${{ runner.os }}-composer-
14-
- uses: php-actions/composer@v5
14+
- uses: php-actions/composer@v6
1515
with:
1616
args: --prefer-dist
17-
php_version: 8.0
17+
php_version: '8.2'
1818
- name: PHPStan
19-
uses: php-actions/phpstan@v2
19+
uses: php-actions/phpstan@v3
2020
with:
2121
path: src/
2222
level: 7
23-
php_version: 8.0
23+
php_version: '8.2'

.github/workflows/phpstan-8.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ jobs:
44
phpstan:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/cache@v2
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
99
with:
1010
path: '**/vendor'
1111
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
1212
restore-keys: |
1313
${{ runner.os }}-composer-
14-
- uses: php-actions/composer@v5
14+
- uses: php-actions/composer@v6
1515
with:
1616
args: --prefer-dist
17-
php_version: 8.0
17+
php_version: '8.2'
1818
- name: PHPStan
19-
uses: php-actions/phpstan@v2
19+
uses: php-actions/phpstan@v3
2020
with:
2121
path: src/
2222
level: 8
23-
php_version: 8.0
23+
php_version: '8.2'

.github/workflows/quality.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,35 @@ jobs:
44
cs-fixer:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
7+
- uses: actions/checkout@v3
8+
- uses: shivammathur/setup-php@v2
9+
with:
10+
php-version: '8.2'
11+
tools: composer:v2
12+
coverage: none
813
- name: Cs-Fixer
914
run: |
10-
wget -q https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer
15+
wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer
1116
chmod a+x php-cs-fixer
1217
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run
1318
1419
phpstan:
1520
runs-on: ubuntu-latest
1621
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/cache@v2
22+
- uses: actions/checkout@v3
23+
- uses: actions/cache@v3
1924
with:
2025
path: '**/vendor'
2126
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
2227
restore-keys: |
2328
${{ runner.os }}-composer-
24-
- uses: php-actions/composer@v5
29+
- uses: php-actions/composer@v6
2530
with:
2631
args: --prefer-dist
27-
php_version: 8.0
32+
php_version: '8.2'
2833
- name: PHPStan
29-
uses: php-actions/phpstan@v2
34+
uses: php-actions/phpstan@v3
3035
with:
3136
path: src/
3237
level: 4
33-
php_version: 8.0
38+
php_version: '8.2'

.github/workflows/rector.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# github action that checks code with Rector
2+
name: Rector
3+
4+
on:
5+
pull_request: null
6+
7+
jobs:
8+
rector:
9+
runs-on: ubuntu-latest
10+
if: github.event.pull_request.head.repo.full_name == 'php-etl/pipeline-contracts'
11+
steps:
12+
-
13+
uses: actions/checkout@v3
14+
15+
-
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: '8.2'
19+
coverage: none
20+
21+
- uses: "ramsey/composer-install@v2"
22+
23+
- run: bin/rector --ansi
24+
25+
-
26+
# commit only to core contributors who have repository access
27+
uses: stefanzweifel/git-auto-commit-action@v4
28+
with:
29+
commit_message: '[rector] Rector fixes'
30+
commit_author: 'GitHub Action <[email protected]>'
31+
commit_user_email: '[email protected]'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/vendor/
2+
bin/
3+
.php-cs-fixer.cache

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
return (new PhpCsFixer\Config())
88
->setRiskyAllowed(true)
99
->setRules([
10+
'@PHP82Migration' => true,
1011
'@PHP81Migration' => true,
1112
'@PHP80Migration:risky' => true,
1213
'@PHPUnit84Migration:risky' => true,

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ with logging, line rejections and execution states.
77

88
[![Quality](https://github.com/php-etl/pipeline-contracts/actions/workflows/quality.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/quality.yaml)
99
[![PHPStan level 5](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-5.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-5.yaml)
10+
[![PHPStan level 6](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-6.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-6.yaml)
1011
[![PHPStan level 7](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-7.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-7.yaml)
1112
[![PHPStan level 8](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-8.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-8.yaml)
1213
![PHP](https://img.shields.io/packagist/php-v/php-etl/pipeline-contracts)
@@ -15,4 +16,3 @@ Documentation
1516
---
1617

1718
[See full Documentation](https://php-etl.github.io/documentation)
18-

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^8.0",
19-
"php-etl/bucket-contracts": "^0.1.0"
18+
"php": "^8.2",
19+
"php-etl/bucket-contracts": "^0.2"
20+
},
21+
"require-dev": {
22+
"phpstan/phpstan": "^1.10",
23+
"friendsofphp/php-cs-fixer": "^3.0",
24+
"rector/rector": "^0.15"
2025
},
2126
"autoload": {
2227
"psr-4": {
@@ -28,7 +33,7 @@
2833
},
2934
"extra": {
3035
"branch-alias": {
31-
"dev-main": "0.3.x-dev"
36+
"dev-main": "0.4.x-dev"
3237
}
3338
}
3439
}

0 commit comments

Comments
 (0)