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 @@ -18,7 +18,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
30 changes: 16 additions & 14 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.1', '8.2', '8.3', '8.4']
php-version: ['8.2', '8.3', '8.4']

uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.9.3
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_phplinter.yml@v1.10.0
with:
php-version: ${{ matrix.php-version }}

Expand All @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false

uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.9.3
uses: simplesamlphp/simplesamlphp-test-framework/.github/workflows/reusable_linter.yml@v1.10.0
with:
enable_eslinter: false
enable_jsonlinter: true
Expand All @@ -45,7 +45,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2', '8.3', '8.4']
php-versions: ['8.2', '8.3', '8.4']

steps:
- name: Setup PHP, with composer and extensions
Expand All @@ -69,7 +69,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 @@ -107,15 +107,15 @@ jobs:
fail-fast: true
matrix:
operating-system: [windows-latest]
php-versions: ['8.1', '8.2', '8.3', '8.4']
php-versions: ['8.2', '8.3', '8.4']

steps:
- name: Setup PHP, with composer and extensions
# https://github.com/shivammathur/setup-php
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 @@ -131,7 +131,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 Down Expand Up @@ -168,7 +168,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 @@ -190,7 +190,9 @@ jobs:
run: composer-require-checker check --config-file=tools/composer-require-checker.json composer.json

- name: Check code for unused dependencies in composer.json
run: composer-unused
run: |
composer-unused \
--excludePackage=simplesamlphp/simplesamlphp-assets-jquery

- name: PHP Code Sniffer
run: phpcs
Expand Down Expand Up @@ -226,15 +228,15 @@ jobs:
uses: shivammathur/setup-php@v2
with:
# Should be the lowest supported version
php-version: '8.1'
php-version: '8.2'
extensions: ctype, date, dom, fileinfo, filter, hash, intl, mbstring, openssl, pcre, posix, spl, xml
tools: composer
coverage: none

- 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 @@ -263,9 +265,9 @@ jobs:
runs-on: [ubuntu-latest]
needs: [unit-tests-linux]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
name: coverage-data
path: ${{ github.workspace }}/build
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/MetaEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
namespace SimpleSAML\Module\metaedit\Controller;

use Exception;
use SimpleSAML\SAML2\Constants as C;
use SimpleSAML\Auth;
use SimpleSAML\Configuration;
use SimpleSAML\Error;
use SimpleSAML\Metadata;
use SimpleSAML\Module\metaedit\MetaEditor as Editor;
use SimpleSAML\SAML2\Constants as C;
use SimpleSAML\Session;
use SimpleSAML\Utils;
use SimpleSAML\XHTML\Template;
Expand All @@ -26,7 +26,7 @@
*
* @package simplesamlphp/simplesamlphp-module-metaedit
*/
class MetaEditor

Check failure on line 29 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

ClassMustBeFinal

src/Controller/MetaEditor.php:29:7: ClassMustBeFinal: Class SimpleSAML\Module\metaedit\Controller\MetaEditor is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)

Check warning on line 29 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

UnusedClass

src/Controller/MetaEditor.php:29:7: UnusedClass: Class SimpleSAML\Module\metaedit\Controller\MetaEditor is never used (see https://psalm.dev/075)

Check failure on line 29 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

ClassMustBeFinal

src/Controller/MetaEditor.php:29:7: ClassMustBeFinal: Class SimpleSAML\Module\metaedit\Controller\MetaEditor is never extended and is not part of the public API, and thus must be made final. (see https://psalm.dev/361)

Check warning on line 29 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

UnusedClass

src/Controller/MetaEditor.php:29:7: UnusedClass: Class SimpleSAML\Module\metaedit\Controller\MetaEditor is never used (see https://psalm.dev/075)
{
/** @var \SimpleSAML\Configuration */
protected Configuration $config;
Expand Down Expand Up @@ -101,10 +101,10 @@
$this->moduleConfig->getOptionalArray('metahandlerConfig', ['directory' => '']),
);

$delete = $request->get('delete');

Check failure on line 104 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

InternalMethod

src/Controller/MetaEditor.php:104:29: InternalMethod: The method Symfony\Component\HttpFoundation\Request::get is internal to Symfony but called from SimpleSAML\Module\metaedit\Controller\MetaEditor::main (see https://psalm.dev/175)

Check failure on line 104 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

InternalMethod

src/Controller/MetaEditor.php:104:29: InternalMethod: The method Symfony\Component\HttpFoundation\Request::get is internal to Symfony but called from SimpleSAML\Module\metaedit\Controller\MetaEditor::main (see https://psalm.dev/175)
if ($delete !== null) {
$premetadata = $mdh->getMetadata($delete, 'saml20-sp-remote');
$this->requireOwnership($premetadata, $userid);

Check failure on line 107 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullArgument

src/Controller/MetaEditor.php:107:37: PossiblyNullArgument: Argument 1 of SimpleSAML\Module\metaedit\Controller\MetaEditor::requireOwnership cannot be null, possibly null value provided (see https://psalm.dev/078)

Check failure on line 107 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullArgument

src/Controller/MetaEditor.php:107:37: PossiblyNullArgument: Argument 1 of SimpleSAML\Module\metaedit\Controller\MetaEditor::requireOwnership cannot be null, possibly null value provided (see https://psalm.dev/078)
$mdh->deleteMetadata($delete, 'saml20-sp-remote');
}

Expand Down Expand Up @@ -151,25 +151,25 @@
}
$userid = $attributes[$useridattr][0];

$entityId = $request->get('entityid');

Check failure on line 154 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

InternalMethod

src/Controller/MetaEditor.php:154:31: InternalMethod: The method Symfony\Component\HttpFoundation\Request::get is internal to Symfony but called from SimpleSAML\Module\metaedit\Controller\MetaEditor::edit (see https://psalm.dev/175)

Check failure on line 154 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

InternalMethod

src/Controller/MetaEditor.php:154:31: InternalMethod: The method Symfony\Component\HttpFoundation\Request::get is internal to Symfony but called from SimpleSAML\Module\metaedit\Controller\MetaEditor::edit (see https://psalm.dev/175)
$xmlMetadata = $request->get('xmlmetadata');

Check failure on line 155 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

InternalMethod

src/Controller/MetaEditor.php:155:34: InternalMethod: The method Symfony\Component\HttpFoundation\Request::get is internal to Symfony but called from SimpleSAML\Module\metaedit\Controller\MetaEditor::edit (see https://psalm.dev/175)

Check failure on line 155 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

InternalMethod

src/Controller/MetaEditor.php:155:34: InternalMethod: The method Symfony\Component\HttpFoundation\Request::get is internal to Symfony but called from SimpleSAML\Module\metaedit\Controller\MetaEditor::edit (see https://psalm.dev/175)

$mdh = new Metadata\MetaDataStorageHandlerSerialize($this->moduleConfig->getArray('metahandlerConfig', []));

Check failure on line 157 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

TooManyArguments

src/Controller/MetaEditor.php:157:82: TooManyArguments: Too many arguments for method SimpleSAML\Configuration::getarray - saw 2 (see https://psalm.dev/026)

Check failure on line 157 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

TooManyArguments

src/Controller/MetaEditor.php:157:82: TooManyArguments: Too many arguments for method SimpleSAML\Configuration::getarray - saw 2 (see https://psalm.dev/026)

if ($entityId !== null) {
$metadata = $mdh->getMetadata($entityId, 'saml20-sp-remote');
$this->requireOwnership($metadata, $userid);

Check failure on line 161 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullArgument

src/Controller/MetaEditor.php:161:37: PossiblyNullArgument: Argument 1 of SimpleSAML\Module\metaedit\Controller\MetaEditor::requireOwnership cannot be null, possibly null value provided (see https://psalm.dev/078)

Check failure on line 161 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullArgument

src/Controller/MetaEditor.php:161:37: PossiblyNullArgument: Argument 1 of SimpleSAML\Module\metaedit\Controller\MetaEditor::requireOwnership cannot be null, possibly null value provided (see https://psalm.dev/078)
} elseif ($xmlMetadata !== null) {
$xmlUtils = new Utils\XML();
$xmlUtils->checkSAMLMessage($xmlMetadata, 'saml-meta');
$entities = Metadata\SAMLParser::parseDescriptorsString($xmlMetadata);
$entity = array_pop($entities);
$metadata = $entity->getMetadata20SP();

Check failure on line 167 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullReference

src/Controller/MetaEditor.php:167:34: PossiblyNullReference: Cannot call method getMetadata20SP on possibly null value (see https://psalm.dev/083)

Check failure on line 167 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullReference

src/Controller/MetaEditor.php:167:34: PossiblyNullReference: Cannot call method getMetadata20SP on possibly null value (see https://psalm.dev/083)

/* Trim metadata endpoint arrays. */
$metadata['AssertionConsumerService'] = [
Utils\Config\Metadata::getDefaultEndpoint(
$metadata['AssertionConsumerService'],

Check failure on line 172 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullArgument

src/Controller/MetaEditor.php:172:21: PossiblyNullArgument: Argument 1 of SimpleSAML\Utils\Config\Metadata::getDefaultEndpoint cannot be null, possibly null value provided (see https://psalm.dev/078)

Check failure on line 172 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullArrayAccess

src/Controller/MetaEditor.php:172:21: PossiblyNullArrayAccess: Cannot access array value on possibly null variable $metadata of type array<array-key, mixed>|null (see https://psalm.dev/079)

Check failure on line 172 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullArgument

src/Controller/MetaEditor.php:172:21: PossiblyNullArgument: Argument 1 of SimpleSAML\Utils\Config\Metadata::getDefaultEndpoint cannot be null, possibly null value provided (see https://psalm.dev/078)

Check failure on line 172 in src/Controller/MetaEditor.php

View workflow job for this annotation

GitHub Actions / Quality control

PossiblyNullArrayAccess

src/Controller/MetaEditor.php:172:21: PossiblyNullArrayAccess: Cannot access array value on possibly null variable $metadata of type array<array-key, mixed>|null (see https://psalm.dev/079)
[C::BINDING_HTTP_POST],
),
];
Expand Down
Loading