Skip to content

Commit c3e3631

Browse files
authored
Merge pull request #12 from php-etl/feature/qualityflow-improvments
Feature/qualityflow improvments
2 parents 2e487db + 6e5be44 commit c3e3631

21 files changed

+2322
-737
lines changed

.github/workflows/actions.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/infection.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Mutations
2+
on: push
3+
jobs:
4+
infection:
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@v3
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+
24+
- name: Infection
25+
run: |
26+
wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar
27+
wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar.asc
28+
chmod +x infection.phar
29+
./infection.phar
30+
31+
- name: Store infection log
32+
uses: actions/upload-artifact@v3
33+
with:
34+
path: infection.log

.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+
19+
- name: PHPStan
20+
uses: php-actions/phpstan@v3
21+
with:
22+
path: src/
23+
level: 6

.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+
19+
- name: PHPStan
20+
uses: php-actions/phpstan@v3
21+
with:
22+
path: src/
23+
level: 7

.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+
19+
- name: PHPStan
20+
uses: php-actions/phpstan@v3
21+
with:
22+
path: src/
23+
level: 8

.github/workflows/phpunit.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PHPUnit
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@v3
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+
24+
- name: Run tests & generate Coverage
25+
run: bin/phpunit --coverage-html var/coverage
26+
27+
- name: Store coverage files
28+
uses: actions/upload-artifact@v3
29+
with:
30+
path: var/coverage

.github/workflows/quality.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Quality (PHPStan lvl 5)
2+
on: push
3+
jobs:
4+
cs-fixer:
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+
- name: Cs-Fixer
12+
run: |
13+
wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer
14+
chmod a+x php-cs-fixer
15+
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix --dry-run --config=.php-cs-fixer.dist.php
16+
17+
phpstan:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: actions/cache@v3
22+
with:
23+
path: '**/vendor'
24+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-composer-
27+
- uses: php-actions/composer@v6
28+
with:
29+
args: --prefer-dist
30+
php_version: '8.2'
31+
32+
- name: PHPStan
33+
uses: php-actions/phpstan@v3
34+
with:
35+
path: src/
36+
args: --level=5
37+

.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/string-expression-language'
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/vendor/
2+
bin/
3+
.php-cs-fixer.cache
4+
.phpunit.result.cache

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
# String Expression Language
1+
String Expression Language
2+
===
23
This package extends the [ExpressionLanguage](https://symfony.com/doc/current/components/expression_language.html) component of Symfony to compile and evaluate arrays with custom functions.
34

5+
[![Mutations](https://github.com/php-etl/string-expression-language/actions/workflows/infection.yaml/badge.svg)](https://github.com/php-etl/string-expression-language/actions/workflows/infection.yaml)
6+
[![PHPUnit](https://github.com/php-etl/string-expression-language/actions/workflows/phpunit.yaml/badge.svg)](https://github.com/php-etl/string-expression-language/actions/workflows/phpunit.yaml)
7+
[![Quality](https://github.com/php-etl/string-expression-language/actions/workflows/quality.yaml/badge.svg)](https://github.com/php-etl/string-expression-language/actions/workflows/quality.yaml)
8+
[![PHPStan level 5](https://github.com/php-etl/string-expression-language/actions/workflows/phpstan-5.yaml/badge.svg)](https://github.com/php-etl/string-expression-language/actions/workflows/phpstan-5.yaml)
9+
[![PHPStan level 6](https://github.com/php-etl/string-expression-language/actions/workflows/phpstan-6.yaml/badge.svg)](https://github.com/php-etl/string-expression-language/actions/workflows/phpstan-6.yaml)
10+
[![PHPStan level 7](https://github.com/php-etl/string-expression-language/actions/workflows/phpstan-7.yaml/badge.svg)](https://github.com/php-etl/string-expression-language/actions/workflows/phpstan-7.yaml)
11+
[![PHPStan level 8](https://github.com/php-etl/string-expression-language/actions/workflows/phpstan-8.yaml/badge.svg)](https://github.com/php-etl/string-expression-language/actions/workflows/phpstan-8.yaml)
12+
![PHP](https://img.shields.io/packagist/php-v/php-etl/string-expression-language)
13+
414
# Installation
515
```
616
composer require php-etl/string-expression-language

composer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
"minimum-stability": "dev",
1313
"prefer-stable": true,
1414
"require": {
15-
"php": "^8.0",
16-
"symfony/expression-language": "^5.2"
15+
"php": "^8.2",
16+
"symfony/expression-language": "^6.0"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^9.0"
19+
"phpunit/phpunit": "^10.0",
20+
"rector/rector": "^0.15",
21+
"phpstan/phpstan": "^1.10",
22+
"friendsofphp/php-cs-fixer": "^3.0"
2023
},
2124
"autoload": {
2225
"psr-4": {
@@ -30,7 +33,7 @@
3033
},
3134
"extra": {
3235
"branch-alias": {
33-
"dev-main": "0.1.x-dev"
36+
"dev-main": "0.2.x-dev"
3437
}
3538
},
3639
"config": {

0 commit comments

Comments
 (0)