Skip to content

Commit 84b7dcf

Browse files
committed
fix: download phpDocumentor phar in workflow instead of composer dep
phpdocumentor/shim cannot be installed across the test matrix's older PHP versions, so keep composer.json untouched and have the docs workflow fetch the latest phpDocumentor.phar directly.
1 parent 6614dbd commit 84b7dcf

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

.github/workflows/apigen.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ jobs:
2020
with:
2121
php-version: '8.4'
2222

23-
- name: Install dependencies
24-
run: composer install --no-interaction --no-progress
23+
- name: Download phpDocumentor
24+
run: |
25+
curl -fsSL -o phpDocumentor.phar https://phpdoc.org/phpDocumentor.phar
26+
chmod +x phpDocumentor.phar
2527
2628
- name: Generate API docs
27-
run: composer docs
29+
run: php phpDocumentor.phar -d src -t docs --no-interaction
2830

2931
- name: Deploy to GitHub Pages
3032
uses: peaceiris/actions-gh-pages@v4

composer.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,11 @@
2424
"psr/log": "Allows you to make the CLI available as PSR-3 logger"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "^8",
28-
"phpdocumentor/shim": "^3"
27+
"phpunit/phpunit": "^8"
2928
},
3029
"autoload": {
3130
"psr-4": {
3231
"splitbrain\\phpcli\\": "src"
3332
}
34-
},
35-
"scripts": {
36-
"docs": "phpdoc -d src -t docs --no-interaction"
37-
},
38-
"config": {
39-
"allow-plugins": {
40-
"phpdocumentor/shim": true
41-
}
4233
}
4334
}

0 commit comments

Comments
 (0)