Skip to content

Commit 0e43145

Browse files
authored
Merge pull request #3 from Phauthentic/develop
Enable PHP 8
2 parents 4609ed5 + 5b0b5ad commit 0e43145

File tree

9 files changed

+1378
-1583
lines changed

9 files changed

+1378
-1583
lines changed

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
testsuite:
7+
name: Unittests
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php-version: ['7.4', '8.0']
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-version }}
23+
extensions: json, pdo, ldap
24+
tools: pecl
25+
coverage: pcov
26+
27+
- name: Composer install
28+
run: |
29+
if [[ ${{ matrix.prefer-lowest == '7.4' }} ]]; then
30+
composer update --prefer-lowest --prefer-stable
31+
else
32+
composer install
33+
fi
34+
- name: Run PHPUnit
35+
run: |
36+
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
37+
bin/phpunit --coverage-clover=coverage.xml
38+
else
39+
bin/phpunit
40+
fi
41+
- name: Code Coverage Report
42+
if: success() && matrix.php-version == '7.4'
43+
uses: codecov/codecov-action@v2
44+
45+
validation:
46+
name: Coding Standard & Static Analysis
47+
runs-on: ubuntu-20.04
48+
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
fetch-depth: 1
53+
54+
- name: Setup PHP
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: '7.4'
58+
extensions: json, pdo, ldap
59+
coverage: none
60+
tools: pecl
61+
62+
- name: Composer install
63+
run: composer update --prefer-stable
64+
65+
- name: Run phpcs
66+
run: bin/phpcs --version && bin/phpcs --report=checkstyle --standard=phpcs.xml src/ tests/
67+
68+
- name: Run phpstan
69+
run: bin/phpstan -V && bin/phpstan --error-format=github

.scrutinizer.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build:
33
analysis:
44
environment:
55
php:
6-
version: 7.3
6+
version: 7.4
77
project_setup:
88
override:
99
- 'true'
@@ -15,14 +15,14 @@ build:
1515
coverage:
1616
file: 'coverage.xml'
1717
format: 'php-clover'
18-
php73:
19-
environment:
20-
php:
21-
version: 7.3
2218
php74:
2319
environment:
2420
php:
2521
version: 7.4
22+
php80:
23+
environment:
24+
php:
25+
version: 8.0
2626
filter:
2727
excluded_paths:
2828
- 'tests/*'

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
"description": "Correlation ID and PSR7 middleware to inject it",
44
"type": "library",
55
"require": {
6-
"php": "^7.2",
7-
"ramsey/uuid": "^3.0",
6+
"php": "^7.4 || ^8.0 || ^8.1",
7+
"ramsey/uuid": "^3.0 || ^4.0",
88
"psr/http-message": "^1.0",
99
"psr/http-server-handler": "^1.0",
1010
"psr/http-server-middleware": "^1.0"
1111
},
1212
"require-dev": {
13-
"phpunit/phpunit": "^8.0",
14-
"phpstan/phpstan": "^0.11.0",
15-
"squizlabs/php_codesniffer": "^3.5"
13+
"phpunit/phpunit": "^9.0",
14+
"phpstan/phpstan": "^0.12.0",
15+
"squizlabs/php_codesniffer": "^3.6"
1616
},
1717
"license": "MIT",
1818
"authors": [
@@ -33,19 +33,19 @@
3333
"minimum-stability": "stable",
3434
"scripts": {
3535
"test": [
36-
".\\bin\\phpunit"
36+
"phpunit"
3737
],
3838
"coverage": [
39-
".\\bin\\phpunit --coverage-html ./tmp/coverage"
39+
"phpunit --coverage-html ./tmp/coverage"
4040
],
4141
"cscheck": [
42-
".\\bin\\phpcs .\\src .\\tests --standard=.\\phpcs.xml"
42+
"phpcs ./src ./tests --standard=./phpcs.xml"
4343
],
4444
"csfix": [
45-
".\\bin\\phpcbf .\\src .\\tests --standard=.\\phpcs.xml"
45+
"phpcbf ./src ./tests --standard=./phpcs.xml"
4646
],
4747
"analyze": [
48-
".\\bin\\phpstan analyse -l 5 -c phpstan.neon .\\src\\"
48+
"phpstan analyse -c phpstan.neon ./src/"
4949
]
5050
},
5151
"config": {

0 commit comments

Comments
 (0)