Skip to content

Commit 9f1d8f4

Browse files
committed
Replace super-linter with custom linters
1 parent e289cdd commit 9f1d8f4

File tree

6 files changed

+16
-80
lines changed

6 files changed

+16
-80
lines changed

.github/workflows/php.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
uses: shivammathur/setup-php@v2
118118
with:
119119
php-version: ${{ matrix.php-versions }}
120-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
120+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml, zip
121121
tools: composer
122122
ini-values: error_reporting=E_ALL
123123
coverage: none
@@ -164,9 +164,8 @@ jobs:
164164
with:
165165
# Should be the higest supported version, so we can use the newest tools
166166
php-version: '8.4'
167-
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
168-
# optional performance gain for psalm: opcache
169-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, pcre, posix, spl, xml
167+
tools: composer, composer-require-checker, composer-unused, phpcs, phpstan
168+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
170169

171170
- name: Setup problem matchers for PHP
172171
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -198,27 +197,13 @@ jobs:
198197
- name: PHP Code Sniffer
199198
run: phpcs
200199

201-
- name: Psalm
202-
continue-on-error: true
203-
run: |
204-
psalm -c psalm.xml \
205-
--show-info=true \
206-
--shepherd \
207-
--php-version=${{ steps.setup-php.outputs.php-version }}
208-
209-
- name: Psalm (testsuite)
200+
- name: PHPStan
210201
run: |
211-
psalm -c psalm-dev.xml \
212-
--show-info=true \
213-
--shepherd \
214-
--php-version=${{ steps.setup-php.outputs.php-version }}
202+
vendor/bin/phpstan analyze -c phpstan.neon
215203
216-
- name: Psalter
204+
- name: PHPStan (testsuite)
217205
run: |
218-
psalm --alter \
219-
--issues=UnnecessaryVarAnnotation \
220-
--dry-run \
221-
--php-version=${{ steps.setup-php.outputs.php-version }}
206+
vendor/bin/phpstan analyze -c phpstan-dev.neon
222207
223208
security:
224209
name: Security checks

phpstan-dev.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 9
3+
paths:
4+
- tests

phpstan.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 6
3+
paths:
4+
- src

psalm-dev.xml

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

psalm.xml

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

src/Controller/AttributeServer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function main(/** @scrutinizer ignore-unused */ Request $request): Runnab
109109
Logger::debug('Requested attributes with wrong NameFormat - no attributes returned.');
110110
$returnAttributes = [];
111111
} else {
112-
/** @var array $values */
112+
/** @var array<mixed>$values */
113113
foreach ($returnAttributes as $name => $values) {
114114
if (!array_key_exists($name, $attributes)) {
115115
// We don't have this attribute

0 commit comments

Comments
 (0)