Skip to content

Commit 561e5bc

Browse files
committed
Initial commit
0 parents  commit 561e5bc

File tree

14 files changed

+421
-0
lines changed

14 files changed

+421
-0
lines changed

.github/workflows/phpstan-5.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
args: --level=5

.github/workflows/phpstan-7.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
args: --level=5

.github/workflows/phpstan-8.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
args: --level=5

.github/workflows/quality.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Quality
2+
on: push
3+
jobs:
4+
cs-fixer:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Cs-Fixer
9+
run: |
10+
wget -q https://cs.symfony.com/download/php-cs-fixer-v3.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

.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: pull_request
5+
6+
jobs:
7+
rector:
8+
runs-on: ubuntu-latest
9+
if: github.event.pull_request.head.repo.full_name == 'php-etl/job-contracts'
10+
steps:
11+
-
12+
if: github.event.pull_request.head.repo.full_name == github.repository
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/vendor/
2+
/bin/
3+
.php-cs-fixer.cache

.php-cs-fixer.dist.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
$finder = (new PhpCsFixer\Finder())
4+
->in('src')
5+
;
6+
7+
return (new PhpCsFixer\Config())
8+
->setRiskyAllowed(true)
9+
->setRules([
10+
'@PHP81Migration' => true,
11+
'@PHP80Migration:risky' => true,
12+
'@PHPUnit84Migration:risky' => true,
13+
'@PSR1' => true,
14+
'@PSR12' => true,
15+
'@PhpCsFixer' => true,
16+
'@Symfony' => true,
17+
'ternary_to_elvis_operator' => true,
18+
'set_type_to_cast' => true,
19+
'self_accessor' => true,
20+
'psr_autoloading' => true,
21+
'php_unit_test_annotation' => ['style' => 'annotation'],
22+
'php_unit_set_up_tear_down_visibility' => true,
23+
'php_unit_construct' => true,
24+
'no_useless_sprintf' => true,
25+
'no_homoglyph_names' => true,
26+
'native_function_invocation' => true,
27+
'native_constant_invocation' => true,
28+
'modernize_types_casting' => true,
29+
'logical_operators' => true,
30+
'is_null' => true,
31+
'function_to_constant' => true,
32+
'fopen_flag_order' => true,
33+
'error_suppression' => true,
34+
'ereg_to_preg' => true,
35+
'dir_constant' => true,
36+
])
37+
->setFinder($finder)
38+
->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line
39+
;

LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Kiboko Middleware
2+
3+
MIT License
4+
5+
Copyright (c) 2020 Kiboko SAS
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

README.md

Lines changed: 19 additions & 0 deletions
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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "php-etl/job-contracts",
3+
"description": "This library describes contracts for defining job formats",
4+
"type": "library",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Kiboko SAS",
9+
"homepage": "http://kiboko.fr"
10+
},
11+
{
12+
"name": "Grégory Planchat",
13+
"email": "[email protected]"
14+
}
15+
],
16+
"minimum-stability": "dev",
17+
"prefer-stable": true,
18+
"require": {
19+
"php": "^8.2"
20+
},
21+
"require-dev": {
22+
"rector/rector": "^0.15.0"
23+
},
24+
"autoload": {
25+
"psr-4": {
26+
"Kiboko\\Contract\\Job\\": "src/"
27+
}
28+
},
29+
"config": {
30+
"bin-dir": "bin",
31+
"allow-plugins": {
32+
"php-http/discovery": true
33+
}
34+
},
35+
"extra": {
36+
"branch-alias": {
37+
"dev-main": "0.1.x-dev"
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)