Skip to content

Commit 33b060e

Browse files
committed
Replace super-linter with custom linters
1 parent a5573f6 commit 33b060e

File tree

6 files changed

+18
-73
lines changed

6 files changed

+18
-73
lines changed

.github/workflows/php.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
uses: shivammathur/setup-php@v2
116116
with:
117117
php-version: ${{ matrix.php-versions }}
118-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
118+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml, zip
119119
tools: composer
120120
ini-values: error_reporting=E_ALL
121121
coverage: none
@@ -161,9 +161,8 @@ jobs:
161161
with:
162162
# Should be the higest supported version, so we can use the newest tools
163163
php-version: '8.4'
164-
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
165-
# optional performance gain for psalm: opcache
166-
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, pcre, posix, spl, xml
164+
tools: composer, composer-require-checker, composer-unused, phpcs, phpstan
165+
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
167166

168167
- name: Setup problem matchers for PHP
169168
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
@@ -195,27 +194,13 @@ jobs:
195194
- name: PHP Code Sniffer
196195
run: phpcs
197196

198-
- name: Psalm
199-
continue-on-error: true
200-
run: |
201-
psalm -c psalm.xml \
202-
--show-info=true \
203-
--shepherd \
204-
--php-version=${{ steps.setup-php.outputs.php-version }}
205-
206-
- name: Psalm (testsuite)
197+
- name: PHPStan
207198
run: |
208-
psalm -c psalm-dev.xml \
209-
--show-info=true \
210-
--shepherd \
211-
--php-version=${{ steps.setup-php.outputs.php-version }}
199+
vendor/bin/phpstan analyze -c phpstan.neon
212200
213-
- name: Psalter
201+
- name: PHPStan (testsuite)
214202
run: |
215-
psalm --alter \
216-
--issues=UnnecessaryVarAnnotation \
217-
--dry-run \
218-
--php-version=${{ steps.setup-php.outputs.php-version }}
203+
vendor/bin/phpstan analyze -c phpstan-dev.neon
219204
220205
security:
221206
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 & 18 deletions
This file was deleted.

psalm.xml

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

src/Auth/Process/EntityCategory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class EntityCategory extends Auth\ProcessingFilter
2727
* A list of categories available. An associative array where the identifier of the category is the key, and the
2828
* associated value is an array with all the attributes allowed for services in that category.
2929
*
30-
* @var array
30+
* @var array<mixed>
3131
*/
3232
protected array $categories = [];
3333

@@ -63,7 +63,7 @@ class EntityCategory extends Auth\ProcessingFilter
6363
/**
6464
* EntityCategory constructor.
6565
*
66-
* @param array $config An array with the configuration for this processing filter.
66+
* @param array<mixed> $config An array with the configuration for this processing filter.
6767
* @param mixed $reserved For future use.
6868
* @throws \SimpleSAML\Error\ConfigurationError In case of a misconfiguration of the filter.
6969
*/
@@ -122,7 +122,7 @@ public function __construct(array $config, $reserved)
122122
/**
123123
* Apply the filter to modify the list of attributes for the current service provider.
124124
*
125-
* @param array &$state The current request.
125+
* @param array<mixed> &$state The current request.
126126
*/
127127
public function process(array &$state): void
128128
{

0 commit comments

Comments
 (0)