Skip to content

Commit 6c20d47

Browse files
Merge pull request #4 from loevgaard/robustness
Robustness
2 parents d1c9547 + 23a6572 commit 6c20d47

File tree

4 files changed

+163
-13
lines changed

4 files changed

+163
-13
lines changed

.editorconfig

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

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* text=auto
2+
3+
/.github export-ignore
4+
/tests export-ignore
5+
/.editorconfig export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/CHANGELOG.md export-ignore
10+
/README.md export-ignore

.github/workflows/build.yaml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: "build"
2+
on:
3+
push:
4+
branches:
5+
- "master"
6+
pull_request: ~
7+
workflow_dispatch: ~
8+
9+
jobs:
10+
coding-standards:
11+
name: "Coding Standards"
12+
13+
runs-on: "ubuntu-latest"
14+
15+
strategy:
16+
matrix:
17+
php-version:
18+
- "8.0"
19+
20+
dependencies:
21+
- "highest"
22+
23+
steps:
24+
- name: "Checkout"
25+
uses: "actions/checkout@v3"
26+
27+
- name: "Setup PHP, with composer and extensions"
28+
uses: "shivammathur/setup-php@v2"
29+
with:
30+
php-version: "${{ matrix.php-version }}"
31+
extensions: "${{ env.PHP_EXTENSIONS }}"
32+
coverage: "none"
33+
34+
- name: "Install composer dependencies"
35+
uses: "ramsey/composer-install@v2"
36+
with:
37+
dependency-versions: "${{ matrix.dependencies }}"
38+
39+
- name: "Validate composer"
40+
run: "composer validate --strict"
41+
42+
- name: "Check composer normalized"
43+
run: "composer normalize --dry-run"
44+
45+
# - name: "Check style"
46+
# run: "composer check-style"
47+
48+
dependency-analysis:
49+
name: "Dependency Analysis"
50+
51+
runs-on: "ubuntu-latest"
52+
53+
strategy:
54+
matrix:
55+
php-version:
56+
- "8.0"
57+
- "8.1"
58+
59+
dependencies:
60+
- "highest"
61+
62+
steps:
63+
- name: "Checkout"
64+
uses: "actions/checkout@v3"
65+
66+
- name: "Setup PHP, with composer and extensions"
67+
uses: "shivammathur/setup-php@v2"
68+
with:
69+
coverage: "none"
70+
extensions: "${{ env.PHP_EXTENSIONS }}"
71+
php-version: "${{ matrix.php-version }}"
72+
tools: "composer-require-checker, composer-unused"
73+
74+
- name: "Install composer dependencies"
75+
uses: "ramsey/composer-install@v2"
76+
with:
77+
dependency-versions: "${{ matrix.dependencies }}"
78+
79+
- name: "Run maglnet/composer-require-checker"
80+
run: "composer-require-checker check"
81+
82+
- name: "Run composer-unused/composer-unused"
83+
run: "composer-unused"
84+
85+
static-code-analysis:
86+
name: "Static Code Analysis"
87+
88+
runs-on: "ubuntu-latest"
89+
90+
strategy:
91+
matrix:
92+
php-version:
93+
- "8.0"
94+
- "8.1"
95+
96+
dependencies:
97+
- "highest"
98+
99+
steps:
100+
- name: "Checkout"
101+
uses: "actions/checkout@v3"
102+
103+
- name: "Setup PHP, with composer and extensions"
104+
uses: "shivammathur/setup-php@v2"
105+
with:
106+
php-version: "${{ matrix.php-version }}"
107+
extensions: "${{ env.PHP_EXTENSIONS }}"
108+
coverage: "none"
109+
110+
- name: "Install composer dependencies"
111+
uses: "ramsey/composer-install@v2"
112+
with:
113+
dependency-versions: "${{ matrix.dependencies }}"
114+
115+
- name: "Static analysis"
116+
run: "composer phpstan"

composer.json

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
11
{
22
"name": "benjaminfavre/oauth2-http-client",
33
"description": "A lightweight OAuth 2 decorator for the Symfony HTTP Client.",
4-
"keywords": ["symfony", "oauth", "http-client"],
5-
"homepage": "https://github.com/BenjaminFavre/oauth2-http-client",
64
"license": "Apache-2.0",
5+
"keywords": [
6+
"symfony",
7+
"oauth",
8+
"http-client"
9+
],
710
"authors": [
811
{
912
"name": "Benjamin Favre",
1013
"email": "[email protected]",
1114
"homepage": "https://github.com/BenjaminFavre"
1215
}
1316
],
14-
"autoload": {
15-
"psr-4": {"BenjaminFavre\\OAuthHttpClient\\": "src/"}
16-
},
17+
"homepage": "https://github.com/BenjaminFavre/oauth2-http-client",
1718
"require": {
18-
"php": "^8.0.0",
19+
"php": "^8.0",
1920
"ext-json": "*",
20-
"symfony/http-client-contracts": "^3.0",
21-
"symfony/cache-contracts": "^3.0"
22-
},
23-
"provide": {
24-
"symfony/http-client-implementation": "^2.3.1"
21+
"symfony/cache-contracts": "^3.0",
22+
"symfony/http-client-contracts": "^3.0"
2523
},
2624
"require-dev": {
25+
"ergebnis/composer-normalize": "^2.28",
26+
"phpstan/phpstan": "^0.12.64",
2727
"phpunit/phpunit": "^9.4.3",
2828
"symfony/cache": "^6.0",
29-
"symfony/http-client": "^6.0",
30-
"phpstan/phpstan": "^0.12.64"
29+
"symfony/http-client": "^6.0"
30+
},
31+
"provide": {
32+
"symfony/http-client-implementation": "^2.3.1"
33+
},
34+
"autoload": {
35+
"psr-4": {
36+
"BenjaminFavre\\OAuthHttpClient\\": "src/"
37+
}
38+
},
39+
"config": {
40+
"allow-plugins": {
41+
"ergebnis/composer-normalize": true
42+
}
3143
},
3244
"scripts": {
3345
"phpstan": "vendor/bin/phpstan analyse --level max src tests"

0 commit comments

Comments
 (0)