Skip to content

Commit 7d243d4

Browse files
authored
Merge pull request #3 from php-etl/feature/qualityflow-improvments
Upgraded to PHP 8.2 + added actions
2 parents 96645d4 + e568b75 commit 7d243d4

25 files changed

+1311
-1703
lines changed

.github/workflows/phpspec.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
name: PHPSpec
22
on: push
3+
jobs:
34
phpspec:
45
runs-on: ubuntu-latest
56
steps:
6-
- uses: actions/checkout@v2
7-
- uses: php-actions/composer@v5
7+
- uses: actions/checkout@v3
8+
- uses: php-actions/composer@v6
89
with:
910
args: --prefer-dist
10-
php_version: 8.0
11+
php_version: '8.2'
12+
- uses: shivammathur/setup-php@v2
13+
with:
14+
php-version: '8.2'
15+
coverage: none
1116
- name: PHP Spec
1217
run: bin/phpspec run spec

.github/workflows/phpstan-5.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PHPStan level 5
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: 5
23+
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: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PHPStan level 7
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: 7
23+
php_version: '8.2'

.github/workflows/phpstan-8.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PHPStan level 8
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: 8
23+
php_version: '8.2'

.github/workflows/quality.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,37 @@
1-
name: Quality
1+
name: Quality (PHPStan lvl 4)
22
on: push
33
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+
coverage: none
812
- name: Cs-Fixer
913
run: |
10-
wget -q https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer
14+
wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer
1115
chmod a+x php-cs-fixer
1216
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run
1317
14-
phpspec:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v2
18-
- uses: php-actions/composer@v5
19-
with:
20-
args: --prefer-dist
21-
php_version: 8.0
22-
- name: PHP Spec
23-
run: bin/phpspec run spec
24-
2518
phpstan:
2619
runs-on: ubuntu-latest
2720
steps:
28-
- uses: actions/checkout@v2
29-
- uses: actions/cache@v2
21+
- uses: actions/checkout@v3
22+
- uses: actions/cache@v3
3023
with:
3124
path: '**/vendor'
3225
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
3326
restore-keys: |
3427
${{ runner.os }}-composer-
35-
- uses: php-actions/composer@v5
28+
- uses: php-actions/composer@v6
3629
with:
3730
args: --prefer-dist
38-
php_version: 8.0
31+
php_version: '8.2'
3932

4033
- name: PHPStan
41-
uses: php-actions/phpstan@v2
34+
uses: php-actions/phpstan@v3
4235
with:
4336
path: src/
44-
args: --level=8
37+
level: 4

.github/workflows/rector.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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/bucket'
11+
steps:
12+
-
13+
if: github.event.pull_request.head.repo.full_name == github.repository
14+
uses: actions/checkout@v3
15+
16+
-
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '8.2'
20+
coverage: none
21+
22+
- uses: "ramsey/composer-install@v2"
23+
24+
- run: bin/rector --ansi
25+
26+
-
27+
# commit only to core contributors who have repository access
28+
uses: stefanzweifel/git-auto-commit-action@v4
29+
with:
30+
commit_message: '[rector] Rector fixes'
31+
commit_author: 'GitHub Action <[email protected]>'
32+
commit_user_email: '[email protected]'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea/
22
vendor/
33
/.env
4+
/bin/
5+
/.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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Bucket
2+
===
3+
4+
5+
[![Quality (PHPStan lvl 4)](https://github.com/php-etl/bucket/actions/workflows/quality.yml/badge.svg)](https://github.com/php-etl/bucket/actions/workflows/quality.yml)
6+
[![Infection](https://github.com/php-etl/bucket/actions/workflows/infection.yaml/badge.svg)](https://github.com/php-etl/bucket/actions/workflows/infection.yaml)
7+
[![PHPSpec](https://github.com/php-etl/bucket/actions/workflows/phpspec.yml/badge.svg)](https://github.com/php-etl/bucket/actions/workflows/phpspec.yml)
8+
[![PHPStan level 5](https://github.com/php-etl/bucket/actions/workflows/phpstan-5.yaml/badge.svg)](https://github.com/php-etl/bucket/actions/workflows/phpstan-5.yaml)
9+
[![PHPStan level 6](https://github.com/php-etl/bucket/actions/workflows/phpstan-6.yaml/badge.svg)](https://github.com/php-etl/bucket/actions/workflows/phpstan-6.yaml)
10+
[![PHPStan level 7](https://github.com/php-etl/bucket/actions/workflows/phpstan-7.yaml/badge.svg)](https://github.com/php-etl/bucket/actions/workflows/phpstan-7.yaml)
11+
[![PHPStan level 8](https://github.com/php-etl/bucket/actions/workflows/phpstan-8.yaml/badge.svg)](https://github.com/php-etl/bucket/actions/workflows/phpstan-8.yaml)
12+
![PHP](https://img.shields.io/packagist/php-v/php-etl/bucket)
13+
14+
Documentation
15+
---
16+
17+
[See full Documentation](https://php-etl.github.io/documentation)
18+
19+
Installation
20+
---
21+
22+
```
23+
composer require php-etl/bucket
24+
```

0 commit comments

Comments
 (0)