Skip to content

Commit 8556d4e

Browse files
committed
Merge branch 'main' into bugfix/parenthesisInExpressions
2 parents 734aa46 + 1b0aeb3 commit 8556d4e

File tree

87 files changed

+1883
-3131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1883
-3131
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,11 @@ indent_size = 2
1818
[*.json]
1919
indent_style = space
2020
indent_size = 2
21+
22+
[*.xml]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[*.yml]
27+
indent_style = space
28+
indent_size = 2
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Set up PHP'
2+
description: 'Set up PHP and composer incl. caches'
3+
inputs:
4+
php-version:
5+
description: 'The version of PHP to set up'
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: ${{ inputs.php-version }}
14+
coverage: xdebug
15+
16+
- id: composer-cache
17+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
18+
shell: bash
19+
20+
- uses: actions/cache@v2
21+
with:
22+
path: ${{ steps.composer-cache.outputs.dir }}
23+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
24+
restore-keys: ${{ runner.os }}-composer-
25+
26+
- run: composer install
27+
shell: bash

.github/workflows/qa.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: QA
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main, '[0-9]+.[0-9]' ]
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
# This allows a subsequently queued workflow run to interrupt previous runs
13+
concurrency:
14+
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
15+
cancel-in-progress: true
16+
17+
jobs:
18+
static-analysis:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- uses: ./.github/actions/setup-php
23+
with:
24+
php-version: '8.1'
25+
26+
- name: Static Code Analysis with phpstan
27+
run: ./scripts/analyse
28+
shell: bash
29+
30+
tests:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
php-version: ['8.1', '8.2']
35+
testsuite: ['unit', 'integration']
36+
steps:
37+
- uses: actions/checkout@v3
38+
- uses: ./.github/actions/setup-php
39+
with:
40+
php-version: ${{ matrix.php-version }}
41+
42+
- name: Testsuite "${{ matrix.testsuite }}" with phpunit
43+
run: |
44+
./scripts/test --testsuite ${{ matrix.testsuite }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ example.md
55
Header.md
66
simple.md
77
test.php
8-
error.afx
8+
error.afx
9+
composer.lock
10+
.phpunit.result.cache

Makefile

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

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,40 @@
11
# Nothing to see here yet
2+
3+
## Development
4+
5+
For common automated development tasks, the repository contains several scripts which can be run via composer, like:
6+
7+
```sh
8+
composer {script-name}
9+
```
10+
11+
or, alternatively, directly via:
12+
13+
```sh
14+
./scripts/{script-name}
15+
```
16+
17+
| script-name | description |
18+
|-|-|
19+
| `analyse` | Run static code analysis with [phpstan](https://phpstan.org/) |
20+
| `test` | Run tests with [phpunit](https://phpunit.de/) |
21+
22+
### Running tests
23+
24+
There's a test suite for unit tests and another one for integration tests. By default both test suites are run entirely. In order to just run one of them, you need to add the `--testsuite` parameter to the script call, e.g.:
25+
26+
```sh
27+
composer test -- --testsuite unit
28+
composer test -- --testsuite integration
29+
```
30+
31+
or alternatively:
32+
33+
```sh
34+
./scripts/test --testsuite unit
35+
./scripts/test --testsuite integration
36+
```
37+
38+
## License
39+
40+
see [LICENSE](./LICENSE)

composer.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
"name": "packagefactory/componentengine",
33
"type": "library",
44
"license": "GPL-3.0-or-later",
5-
"authors": [
6-
{
7-
"name": "Wilhelm Behncke",
8-
"email": "[email protected]"
9-
}
10-
],
5+
"scripts": {
6+
"analyse": "./scripts/analyse",
7+
"test": "./scripts/test"
8+
},
119
"require": {
1210
"php": ">=8.1"
1311
},
@@ -22,9 +20,8 @@
2220
}
2321
},
2422
"require-dev": {
25-
"phpunit/phpunit": "^9.5",
26-
"spatie/phpunit-snapshot-assertions": "^4.2",
27-
"phpstan/phpstan": "^1.5",
28-
"phpunit/php-code-coverage": "^9.2"
23+
"phpunit/phpunit": "^10.2",
24+
"phpstan/phpstan": "^1.10",
25+
"phpunit/php-code-coverage": "^10.1"
2926
}
3027
}

0 commit comments

Comments
 (0)