这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
php:
- "8.0"
- "8.1"
- "8.2"
name: "PHPStan at PHP ${{ matrix.php }}"
runs-on: "ubuntu-latest"

Expand All @@ -31,8 +32,19 @@ jobs:
php-version: "${{ matrix.php }}"
coverage: "none"

- name: "Install dependencies (Composer)"
uses: "ramsey/composer-install@v2"
- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer dependencies
run: composer update --no-progress

- name: "Statically analyze code (PHPStan)"
run: "composer phpstan -- --ansi"
run: "composer run phpstan -- --ansi"
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^8.0 || ^8.1",
"php": "^8.0",
"nette/utils": "^3.2",
"php-http/discovery": "^1.14",
"php-http/message": "^1.13",
Expand Down