Skip to content

Commit

Permalink
Merge pull request #15 from artemeon/phpstan
Browse files Browse the repository at this point in the history
feat: PHPStan Level 1
  • Loading branch information
marcreichel committed Mar 3, 2024
2 parents 8cde6b8 + aa3e9f0 commit d77ec52
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 4,726 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/psalm_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
name: UNIT-TESTS
on:
- pull_request
- push
pull_request:
push:
branches:
- master
jobs:
psalm:
name: Psalm
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
- name: Composer install
run: composer install --no-interaction --no-ansi --no-progress
- name: Run Psalm
run: vendor/vimeo/psalm/psalm --no-progress --show-info=false
- name: Run PHPStan
run: composer run phpstan
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -32,4 +34,4 @@ jobs:
- name: Composer install
run: composer install --no-interaction --no-ansi --no-progress
- name: Run PHPUnit
run: vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
run: vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ vendor/
.idea/
bin/
.phpunit.result.cache
composer.lock
13 changes: 10 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,19 @@
"http",
"client"
],
"scripts": {
"phpstan": "php ./vendor/bin/phpstan analyse --memory-limit=4G"
},
"authors": [
{
"name": "Dietmar Simons",
"email": "[email protected]"
}
],
"config": {
"bin-dir": "bin"
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"autoload": {
"psr-4": {
Expand All @@ -37,12 +42,14 @@
},
"require-dev": {
"phpunit/phpunit": "9.*",
"vimeo/psalm": "^4.22",
"phpspec/prophecy-phpunit": "v2.*",
"squizlabs/php_codesniffer": "3.*",
"php-mock/php-mock-prophecy": "0.1.0",
"mikey179/vfsstream": "1.6.*",
"php-http/psr7-integration-tests": "1.1.*"
"php-http/psr7-integration-tests": "1.1.*",
"phpstan/phpstan": "^1.10",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-phpunit": "^1.3"
},
"minimum-stability": "stable"
}
Loading

0 comments on commit d77ec52

Please sign in to comment.