Skip to content

Commit

Permalink
TASK: Tools: Install PHPStan via phar.io
Browse files Browse the repository at this point in the history
  • Loading branch information
nostadt committed Aug 11, 2023
1 parent 6ce5ba3 commit c488fce
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ jobs:
- name: "Switch default PHP Version to 8.1"
run: sudo update-alternatives --set php /usr/bin/php8.1

- name: "Print versions"
run: |
php --version
tools/phpstan --version
- name: "Install Composer dependencies"
run: composer install
run: composer install --no-dev

- name: "PHPStan"
run: vendor/bin/phpstan
run: tools/phpunit

composer_normalize:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -47,11 +52,13 @@ jobs:
- name: "Switch default PHP to: ${{ matrix.version }}"
run: sudo update-alternatives --set php ${{ matrix.version }}

- name: "Print PHP version"
run: php --version
- name: "Print versions"
run: |
php --version
tools/phpunit --version
- name: "Print PHPUnit --version"
run: tools/phpunit --version
- name: "Install Composer dependencies"
run: composer install

- name: "PHPUnit"
run: tools/phpunit
1 change: 1 addition & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpunit" version="^10.3.1" installed="10.3.1" location="./tools/phpunit" copy="true"/>
<phar name="phpstan" version="^1.10.28" installed="1.10.28" location="./tools/phpstan" copy="true"/>
</phive>
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ test:

.PHONY: lint
lint:
docker exec psr3-log-context-container vendor/bin/phpstan
docker exec psr3-log-context-container tools/phpstan
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
"require": {
"php": ">=8.1"
},
"require-dev": {
"phpstan/phpstan": "^1.10"
},
"scripts": {
"normalize": "./bin/json-normalize composer.json 2"
},
Expand Down
3 changes: 1 addition & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
parameters:
level: 9
paths:
- src
- tests
- src
Binary file added tools/phpstan
Binary file not shown.

0 comments on commit c488fce

Please sign in to comment.