Skip to content

Commit a9b7b2d

Browse files
Initial commit
0 parents  commit a9b7b2d

23 files changed

+3226
-0
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
indent_style = space
7+
indent_size = 4
8+
charset = utf-8

.github/workflows/ci.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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: ['8.1', '8.2', '8.3']
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 == '8.1' }} ]]; 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 }} == '8.1' ]]; 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 == '8.1'
43+
uses: codecov/codecov-action@v4
44+
45+
validation:
46+
name: Coding Standard & Static Analysis
47+
runs-on: ubuntu-20.04
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
with:
52+
fetch-depth: 1
53+
54+
- name: Setup PHP
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: '8.1'
58+
extensions: json
59+
coverage: none
60+
61+
- name: Composer install
62+
run: composer update --prefer-stable
63+
64+
- name: Run phpcs
65+
run: bin/phpcs --version && bin/phpcs --report=checkstyle --standard=phpcs.xml src/ tests/
66+
67+
- name: Run phpstan
68+
run: bin/phpstan -V && bin/phpstan analyse -c phpstan.neon --error-format=github

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea
2+
/.phpunit.result.cache
3+
/tmp
4+
/vendor
5+
/bin

LICENSE

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

composer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "phauthentic/error-response",
3+
"type": "library",
4+
"require-dev": {
5+
"nyholm/psr7": "^1.8",
6+
"phpstan/phpstan": "^1.10",
7+
"phpunit/phpunit": "^9.5.0",
8+
"squizlabs/php_codesniffer": "^3.9"
9+
},
10+
"license": "MIT",
11+
"autoload": {
12+
"psr-4": {
13+
"Phauthentic\\ErrorResponse\\": "src/"
14+
}
15+
},
16+
"autoload-dev": {
17+
"psr-4": {
18+
"Phauthentic\\ErrorResponse\\Tests\\": "tests/"
19+
}
20+
},
21+
"authors": [
22+
{
23+
"name": "Florian Krämer"
24+
}
25+
],
26+
"require": {
27+
"php": "^8.1",
28+
"psr/http-factory": "^1.0",
29+
"psr/http-message": "^2.0",
30+
"psr/http-server-middleware": "^1.0"
31+
},
32+
"config": {
33+
"sort-packages": true,
34+
"bin-dir": "bin"
35+
}
36+
}

0 commit comments

Comments
 (0)