Skip to content

Commit 3f98d9c

Browse files
committed
feat: restructure
1 parent cf0375b commit 3f98d9c

File tree

79 files changed

+69
-980
lines changed

Some content is hidden

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

79 files changed

+69
-980
lines changed

.github/workflows/ci.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,28 @@ jobs:
3434
- name: Lint
3535
run: make fmtcheck
3636

37+
docs:
38+
name: Docs
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
42+
43+
- name: Set up PHP
44+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.31.0
45+
with:
46+
php-version: '8.3'
47+
coverage: none
48+
tools: composer:v2
49+
50+
- name: Install dependencies
51+
run: composer install --no-interaction --prefer-dist
52+
53+
- name: Generate docs
54+
run: make docs
55+
56+
- name: Ensure docs are up to date
57+
run: git diff --exit-code -- docs
58+
3759
tests:
3860
name: Tests (PHP ${{ matrix.php }})
3961
runs-on: ubuntu-latest

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ fmt: vendor ## Format code using php-cs-fixer
1818
fmtcheck: vendor ## Check code formatting
1919
PHP_CS_FIXER_IGNORE_ENV=true vendor/bin/php-cs-fixer fix -v --using-cache=no --dry-run
2020

21+
.PHONY: docs
22+
docs: vendor ## Generate API reference using phpDocumentor
23+
vendor/bin/phpdoc --config=phpdoc.dist.xml
24+
2125
.PHONY: test
2226
test: vendor ## Run PHPUnit test suite
2327
composer test

composer.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"homepage": "https://github.com/sumup"
2121
}
2222
],
23+
"config": {
24+
"platform": {
25+
"php": "8.3.0"
26+
}
27+
},
2328
"scripts": {
2429
"cs": "php-cs-fixer fix --dry-run --diff",
2530
"test": "phpunit"
@@ -29,14 +34,15 @@
2934
},
3035
"require-dev": {
3136
"friendsofphp/php-cs-fixer": "3.89.2",
32-
"phpunit/phpunit": "^9.6"
37+
"phpunit/phpunit": "^9.6",
38+
"phpdocumentor/phpdocumentor": "^3.9"
3339
},
3440
"suggest": {
3541
"guzzlehttp/guzzle": "Allows for implementation of the Guzzle HTTP client"
3642
},
3743
"autoload": {
3844
"psr-4": {
39-
"SumUp\\": "src/SumUp/"
45+
"SumUp\\": "src/"
4046
}
4147
},
4248
"autoload-dev": {

docs/ExceptionsHandling.md

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

docs/HowToAuthorize.md

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

docs/HowToOverrideHttpClient.md

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

docs/README.md

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

docs/reference/AccessToken.md

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

docs/reference/ApplicationConfiguration.md

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

0 commit comments

Comments
 (0)