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
29 changes: 7 additions & 22 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml, zip
tools: composer
ini-values: error_reporting=E_ALL
coverage: none
Expand Down Expand Up @@ -161,9 +161,8 @@ jobs:
with:
# Should be the higest supported version, so we can use the newest tools
php-version: '8.4'
tools: composer, composer-require-checker, composer-unused, phpcs, psalm
# optional performance gain for psalm: opcache
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, opcache, openssl, pcre, posix, spl, xml
tools: composer, composer-require-checker, composer-unused, phpcs, phpstan
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml

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

- name: Psalm
continue-on-error: true
run: |
psalm -c psalm.xml \
--show-info=true \
--shepherd \
--php-version=${{ steps.setup-php.outputs.php-version }}

- name: Psalm (testsuite)
- name: PHPStan
run: |
psalm -c psalm-dev.xml \
--show-info=true \
--shepherd \
--php-version=${{ steps.setup-php.outputs.php-version }}
vendor/bin/phpstan analyze -c phpstan.neon

- name: Psalter
- name: PHPStan (testsuite)
run: |
psalm --alter \
--issues=UnnecessaryVarAnnotation \
--dry-run \
--php-version=${{ steps.setup-php.outputs.php-version }}
vendor/bin/phpstan analyze -c phpstan-dev.neon

security:
name: Security checks
Expand Down
4 changes: 4 additions & 0 deletions phpstan-dev.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
level: 9
paths:
- tests
4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
level: 6
paths:
- src
18 changes: 0 additions & 18 deletions psalm-dev.xml

This file was deleted.

30 changes: 0 additions & 30 deletions psalm.xml

This file was deleted.

6 changes: 3 additions & 3 deletions src/Auth/Process/EntityCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class EntityCategory extends Auth\ProcessingFilter
* A list of categories available. An associative array where the identifier of the category is the key, and the
* associated value is an array with all the attributes allowed for services in that category.
*
* @var array
* @var array<string, array<string>>
*/
protected array $categories = [];

Expand Down Expand Up @@ -63,7 +63,7 @@ class EntityCategory extends Auth\ProcessingFilter
/**
* EntityCategory constructor.
*
* @param array $config An array with the configuration for this processing filter.
* @param array<mixed> $config An array with the configuration for this processing filter.
* @param mixed $reserved For future use.
* @throws \SimpleSAML\Error\ConfigurationError In case of a misconfiguration of the filter.
*/
Expand Down Expand Up @@ -122,7 +122,7 @@ public function __construct(array $config, $reserved)
/**
* Apply the filter to modify the list of attributes for the current service provider.
*
* @param array &$state The current request.
* @param array<mixed> &$state The current request.
*/
public function process(array &$state): void
{
Expand Down
Loading