Skip to content

Commit 71581ac

Browse files
authored
Merge pull request #4 from php-etl/refactoring/feature-and-state
Refactoring feature and state
2 parents 4673e72 + 15accdc commit 71581ac

18 files changed

+471
-1953
lines changed

.github/workflows/phpstan-5.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
with:
1616
args: --prefer-dist
1717
php_version: 8.0
18-
1918
- name: PHPStan
2019
uses: php-actions/phpstan@v2
2120
with:
2221
path: src/
23-
args: --level=5
22+
level: 5
23+
php_version: 8.0

.github/workflows/phpstan-7.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
with:
1616
args: --prefer-dist
1717
php_version: 8.0
18-
1918
- name: PHPStan
2019
uses: php-actions/phpstan@v2
2120
with:
2221
path: src/
23-
args: --level=5
22+
level: 7
23+
php_version: 8.0

.github/workflows/phpstan-8.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
with:
1616
args: --prefer-dist
1717
php_version: 8.0
18-
1918
- name: PHPStan
2019
uses: php-actions/phpstan@v2
2120
with:
2221
path: src/
23-
args: --level=5
22+
level: 8
23+
php_version: 8.0

.github/workflows/quality.yaml

+55-57
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,59 @@
1-
name: Quality
1+
name: Quality (PHPStan level 4)
22
on: push
33
jobs:
4-
cs-fixer:
5-
runs-on: ubuntu-latest
6-
steps:
7-
- uses: actions/checkout@v2
8-
- name: Cs-Fixer
9-
run: |
10-
wget -q https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer
11-
chmod a+x php-cs-fixer
12-
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run
4+
cs-fixer:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- name: Cs-Fixer
9+
run: |
10+
wget -q https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer
11+
chmod a+x php-cs-fixer
12+
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run
1313
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
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+
- name: Run tests & generate Coverage
34+
run: bin/phpunit --configuration=phpunit.xml tests --coverage-html var/coverage --whitelist=src
35+
- name: Store coverage files
36+
uses: actions/upload-artifact@v2
37+
with:
38+
path: var/coverage
3339

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
40+
phpstan:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: actions/cache@v2
45+
with:
46+
path: '**/vendor'
47+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
48+
restore-keys: |
49+
${{ runner.os }}-composer-
50+
- uses: php-actions/composer@v5
51+
with:
52+
args: --prefer-dist
53+
php_version: 8.0
54+
- name: PHPStan
55+
uses: php-actions/phpstan@v2
56+
with:
57+
path: src/
58+
level: 4
59+
php_version: 8.0

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Pipeline implementation
2+
===
3+
4+
This package brings an implementation for the pipeline component, aimed at providing an Extract-Transform-Load pattern,
5+
with logging, line rejections and execution states.
6+
7+
8+
[![Quality](https://github.com/php-etl/pipeline/actions/workflows/quality.yaml/badge.svg)](https://github.com/php-etl/pipeline/actions/workflows/quality.yaml)
9+
[![PHPStan level 5](https://github.com/php-etl/pipeline/actions/workflows/phpstan-5.yaml/badge.svg)](https://github.com/php-etl/pipeline/actions/workflows/phpstan-5.yaml)
10+
[![PHPStan level 7](https://github.com/php-etl/pipeline/actions/workflows/phpstan-7.yaml/badge.svg)](https://github.com/php-etl/pipeline/actions/workflows/phpstan-7.yaml)
11+
[![PHPStan level 8](https://github.com/php-etl/pipeline/actions/workflows/phpstan-8.yaml/badge.svg)](https://github.com/php-etl/pipeline/actions/workflows/phpstan-8.yaml)
12+
![PHP](https://img.shields.io/packagist/php-v/php-etl/pipeline)
13+
14+
Documentation
15+
---
16+
17+
[See full Documentation](https://php-etl.github.io/documentation)
18+
19+

composer.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@
1414
}
1515
],
1616
"minimum-stability": "dev",
17+
"prefer-stable": true,
1718
"require": {
1819
"php": "^8.0",
19-
"psr/log": "^1.1@dev",
20+
"psr/log": "^3.0",
2021
"php-etl/bucket": "^0.2.0",
21-
"php-etl/pipeline-contracts": "^0.2.0",
22+
"php-etl/pipeline-contracts": "^0.3.0",
2223
"php-etl/bucket-contracts": "^0.1.0"
2324
},
2425
"require-dev": {
2526
"phpunit/phpunit": "^9.0",
2627
"johnkary/phpunit-speedtrap": "*",
2728
"mybuilder/phpunit-accelerator": "*",
28-
"phpunit/php-invoker": "*",
29-
"fzaninotto/faker": "^1.9@dev",
30-
"phpspec/phpspec": "^7.0",
31-
"friends-of-phpspec/phpspec-code-coverage": "*"
29+
"phpunit/php-invoker": "*"
30+
},
31+
"provide": {
32+
"php-etl/pipeline-implementation": "0.3.0"
3233
},
3334
"autoload": {
3435
"psr-4": {
@@ -37,15 +38,15 @@
3738
},
3839
"autoload-dev": {
3940
"psr-4": {
40-
"unit\\Kiboko\\Component\\ETL\\Pipeline\\": "unit/"
41+
"unit\\Kiboko\\Component\\ETL\\Pipeline\\": "tests/unit/"
4142
}
4243
},
4344
"config": {
4445
"bin-dir": "bin"
4546
},
4647
"extra": {
4748
"branch-alias": {
48-
"dev-master": "0.3.x-dev"
49+
"dev-master": "0.4.x-dev"
4950
}
5051
}
5152
}

0 commit comments

Comments
 (0)