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
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Lint markdown files
uses: nosborn/github-action-markdown-cli@v3
Expand Down
35 changes: 11 additions & 24 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ['ubuntu-latest']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Get composer cache directory
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
Expand All @@ -86,26 +86,13 @@ jobs:
- name: PHP Code Sniffer
run: phpcs

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

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

- name: Psalter
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 All @@ -124,7 +111,7 @@ jobs:
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"

- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Get composer cache directory
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -180,7 +167,7 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf

- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Get composer cache directory
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -226,7 +213,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 All @@ -242,7 +229,7 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf

- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Get composer cache directory
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$env:GITHUB_ENV"
Expand All @@ -265,7 +252,7 @@ jobs:
runs-on: [ubuntu-latest]
needs: [unit-tests-linux]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/download-artifact@v5
with:
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: 5
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
31 changes: 0 additions & 31 deletions psalm.xml

This file was deleted.

12 changes: 6 additions & 6 deletions src/Auth/Process/Authorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Authorize extends Auth\ProcessingFilter
/**
* Array of localised rejection messages
*
* @var array
* @var string[]
*/
protected array $reject_msg = [];

Expand All @@ -60,9 +60,9 @@ class Authorize extends Auth\ProcessingFilter

/**
* Array of valid users. Each element is a regular expression. You should
* user \ to escape special chars, like '.' etc.
* use \ to escape special chars, like '.' etc.
*
* @param array
* @var array<mixed>
*/
protected array $valid_attribute_values = [];

Expand All @@ -82,7 +82,7 @@ class Authorize extends Auth\ProcessingFilter
* Initialize this filter.
* Validate configuration parameters.
*
* @param array $config Configuration information about this filter.
* @param array<mixed> $config Configuration information about this filter.
* @param mixed $reserved For future use.
*/
public function __construct(array $config, $reserved)
Expand Down Expand Up @@ -155,7 +155,7 @@ public function __construct(array $config, $reserved)
/**
* Apply filter to validate attributes.
*
* @param array &$state The current request
* @param array<mixed> &$state The current request
*/
public function process(array &$state): void
{
Expand Down Expand Up @@ -225,7 +225,7 @@ public function process(array &$state): void
* thinking in case a "chained" ACL is needed, more complex
* permission logic.
*
* @param array $state
* @param array<mixed> $state
*/
protected function unauthorized(array &$state): void
{
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Authorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function forbidden(Request $request): Template
throw new Error\BadRequest('Missing required StateId query parameter.');
}

/** @var array $state */
/** @var array<mixed> $state */
$state = Auth\State::loadState($stateId, 'authorize:Authorize');

$t = new Template($this->config, 'authorize:authorize_403.twig');
Expand Down Expand Up @@ -108,7 +108,7 @@ public function reauthenticate(Request $request): void
if (!is_string($stateId)) {
throw new Error\BadRequest('Missing required StateId query parameter.');
}
/** @var array $state */
/** @var array<mixed> $state */
$state = Auth\State::loadState($stateId, 'authorize:Authorize');

$authSource = $state['Source']['auth'];
Expand Down
Loading